Changes

Jump to: navigation, search

B-ASIC

139 bytes added, 14:55, 26 September 2006
'''COLOURS INSTRUCTIONS SET'''
----
'''INKF,pen,colour'''
* pen=[0..15] colour=[0..4095]
* Modify colour of a pen
* Example : INKF,0,2303
----
'''INKFRVB,pen,red,green,blue'''
* pen=[0..15] red=[0..15] green=[0..15] blue=[0..15]
* Modify colour for a pen using colour elementaries components
* Example : FOR I=0 TO 15:INKFRVB,0,I,0,0:NEXT I
----
'''BORDERP,colour'''
* colour=[0..4095]
* Modify border's colour.
* Example : BORDERP,543
----
'''BORDERRVB,red,green,blue'''
* red=[0..15] green=[0..15] blue=[0..15]
* Modify border colour using colour elementaries components
* Example : FOR I=0 TO 15:BORDERRVB,0,0,0,I:NEXT I
----
'''INKS,pen,colour'''
* pen=[1..15] colour=[0..4095]
* Note : The pen 0 cannot be modified. It's the transparent colour.
* Example : INKS,1,3456
----
'''INKSRVB,pen,red,green,blue'''
* pen=[1..15] red=[0..15] green=[0..15] blue=[0..15]
* Note : The pen 0 cannot be modified. It's the transparent colour.
* Example : FOR I=0 TO 15:INKFRVB,0,I,0,0:NEXT I
----
'''SPRITES INSTRUCTIONS SET'''
'''SPROFF,SpriteNumber'''
* Sprite display is disactivated for specified sprite.
* Example : SPROFF,3
----
'''SPRON,SpriteNumber'''
* SpriteNumber=[0..15]
* Sprite display is activated for specified sprite.
* Example : SPRON,3
----
'''SPRZOOM,SpriteNumber,XZoom,YZoom'''
* SpriteNumber=[0..15] XZoom=[0..3] YZoom=[0..3]
* Note : Sprite must be activated by SPRON instruction to be displayed on screen
* Example : SPRZOOM,2,2,1 define the sprite 2 magnification to 2x horiz. and 1x vertically
----
'''SPRXY,SpriteNumber,XPos,YPos'''
* SpriteNumber=[0..15] XPos=[-256..767] YZoom=[-256..255]
* Note : Sprite must be activated by SPRON instruction to be displayed on screen
* Example : SPRXY,2,100,80 define sprite 2 position at 100,80 coordinates
----
'''SPRTDEF,SpriteNumber,Address,DurationPer,WaitingPer'''
* SpriteNumber=[0..15] Address=[0..65535] DurationPer=[0..65535] WaitingPer=[0..65535]
* Example : SPRTDEF,3,&3000,0,100 to define for sprite 3 a path defined in &3000 with an infinite
* loop of the path after 2 seconds of start delay after SPRTON,3 instruction.
----
'''SPRTON,SprNb1,SprNb2,...,SprNbx'''
* SprNbx=[O..15]
* Note : An undefined path for the sprite may occur an erratic behaviour of the sprite started.
* Example : SPRTON,1,5,7 start the path for sprites 1, 5 and 7 simultaneously
----
'''SPRTOFF,SprNb1,SprNb2,...,SprNbx'''
* SprNbx=[0..15]
* Stop the path simultaneously for the specified sprites
* Example : SPRTOFF,1,7 stop the path for sprites 1 and 7 simultanously
----
'''SPRSWAP,SpriteNumber1,SpriteNumber2'''
* SpriteNumberx=[0..15]
* Note : If SpriteNumber1=SpriteNumber2 it results just a waste of time.
* Example : SPRSWAP,1,5 exchange the graphics data of sprites 1 and 5
----
'''SPRPLOT,SpriteNumber,XPos,YPos,SpritePen'''
* SpriteNumber=[0..15] XPos=[0..15] YPos=[0..15] SpritePen=[0..15]
* Note : SpritePen=0 means the transparent pen for sprite
* Example : SPRPLOT,3,10,9,4 plot a pixel pen 4 at coordinates 10,9 of sprite 3
----
'''SPRCOPY,SpriteOrg,SpriteDst
* SpriteOrg=[0..15], SpriteDst=[0..15]
* Copy the content of SpriteOrg to SpriteDst.
* Example : SPRCOPY,1,2 copy the content of sprite 1 to sprite 2
----
'''SPRTURNX,SpriteNumber'''
* SpriteNumber=[0..15]
* Flip the sprite specified on horizontal axis
* Example : SPRTURNX,1
----
'''SPRTURNY,SpriteNumber'''
* SpriteNumber=[0..15]
* Flip the sprite specified on vertical axis
* Example : SPRTURNY,1
----
'''SPRFILL,SpriteNumber,SpritePen'''
* SpriteNumber=[0..15] SpritePen=[0..15]
* Note : SpritePen=0 means the transparent pen for sprite
* Example : SPRFILL,1,12 fill the sprite 1 with pen 12
----
'''SPRSAVE,[SpriteNumber,] BlocNumber, Filename'''
* SpriteNumber=[0..15] BlocNumber=[0..4] Filename=Name of file in Amsdos standard
* in the file named "SPR3BLK1.BIN"
* Example : SPRSAVE,0,"SPRASIC.BIN" save the content of block 0 (e.g. 16 asic sprites)
----
'''SPRLOAD,[SpriteNumber,] BlocNumber, Filename'''
* SpriteNumber=[0..15] BlocNumber=[0..4] Filename=Name of file in Amsdos standard
from the file "SPR3BLK1.BIN"
* Example : SPRLOAD,3,"RAAHHHHH.SPR" load the block 3 (e.g. sprites 32 to 47) from file "RAAHHHHH.SPR"
----
'''SPRTORAM,SpriteAsic,SpriteRam
* SpriteAsic=[0..15] SpriteRam=[0..63]
* See SPRLOAD/SPRSAVE instruction for block oragnisation.
* Example : SPRTORAM,1,17 copy sprite asic 1 to sprite 17 of ram (e.g.in Block 2)
----
'''RAMTOSPR,SpriteRam,SpriteAsic
* SpriteRam=[0..63] SpriteAsic=[0..15]
* See SPRLOAD/SPRSAVE instruction for block oragnisation.
* Example : RAMTOSPR,17,1 copy sprite sprite 17 of ram (2nd of bloc 2) in sprite asic 1
----
'''CATCH,SpriteNumber,XPos,YPos'''
* SpriteNumber=[0..15] XPos=[0..143] YPos=[0..183]
* Note : This instruction runs only in graphic mode 0
* Example : CATCH,3,120,100 catch the pixels from 120,100 to 135,115 in sprite 3
----
'''INKCOPY'''
* Copy the whole colour screen palette to sprite palette.
----
'''SPRLINK,SpriteNumber1,SpriteNumber2,Xrel,Yrel'''
* SpriteNumberx=[0..15] XRel=[-256..767] YRel=[-256..255]
* Example : SPRLINK,2,5,0,16 link sprite 5 to sprite 2 with a relative y position of 16 pixels
* [ so move the sprite 1 signify to move sprite 2 and 5 ]
----
'''SPRUNLINK,SpriteNumber1,SpriteNumber2'''
* SpriteNumberx=[0..15]
* Unlink a sprite from anoter sprite.
* Example : SPRUNLINK,2,5 erase the link between sprite 2 and 5
----
'''ERALINK'''
* Erase all link
----
'''DEFORGXY,SpriteNumber,XPos,YPos'''
* SpriteNumber=[0..15] XPos=[-256..767] YPos=[-256..255]
* Note : It's possible to define an origin position for a sprite following a path (see SPRTDEF)
* The default of origin at B-Asic reset is 0,0
----
'''DEFORGSPR,SpriteSlave,SpriteMaster'''
* SpriteSlave=[0..15] SpriteMaster=[0..15]
* the path 2 will be relative to path 1.
* To erase the slavery of a sprite, use DEFORGXY instruction
----
'''SPRWHERE,SpriteNumber,@varx%,@vary%'''
* SpriteNumber=[0..15] varx=Name of x variable vary=Name of y variable
* be respected to avoid unpredictibles results.
* Example : 10 VARX%=0: VARY%=0 : SPRWHERE,1,@VARX%,@VARY%: PRINT VARX%,VARY%
----
'''OTHERS INSTRUCTIONS SET'''
* Poke one or more bytes in Asic I/O page
* Instruction reserved to experimented users.
----
'''POKEVR,Address,val1,...,valn'''
* Address=[&4000..&7FFF] Valx=[&00..&FF]
* Poke one or more bytes in second video page
* Instruction reserved to experimented users.
----
== ERROR MESSAGES ==
446
edits