Programmer's toolkit

Software and Games for the Lambda 8300 / Power 3000 Computer
Post Reply
User avatar
stefano
Posts: 568
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Programmer's toolkit

Post by stefano »

I described this technique in the ZX81 section already, this is the derived version for the Lambda clones.

NOTE: THIS IS AN EARLIER, BUGGY VERSION
THE ENTRY LOCATIONS WILL PROBABLY CHANGE

Code: Select all


For V1 (older) ROM, add 1 to all the listed values (19110  -> 19111)

==================================================

; USR 19110 must be always invoked at the beginning of your program, followed by CLS.

clg               = 19110   Init new interrupt handler, clear screen and reset graphics pointers. (0,0) = top-left.

_zx_fast          = 17384
_zx_slow          = 17390

; graphics commands
_zx_setpos        = 18743   x,y
_zx_plot          = 17686   x,y
_zx_unplot        = 17728   x,y
_zx_xorplot       = 17770   x,y
_zx_draw          = 17812   +/- x,y (relative coordinate)
_zx_undraw        = 17872   +/- x,y (relative coordinate)
_zx_xordraw       = 17932   +/- x,y (relative coordinate)
_zx_drawto        = 17992   x,y
_zx_undrawto      = 18034   x,y
_zx_xordrawto     = 18076   x,y
_zx_circle        = 18118   x,y,radius
_zx_uncircle      = 18174   x,y,radius
_zx_xorcircle     = 18230   x,y,radius
_zx_fill          = 18286   x,y  flood fill starting at the given position
_zx_clga          = 18523  clear screen area: x,y,x2,y2
_zx_fillb         = 18587  fill screen area x,y,x2,y2

_zx_miniprint     = 18330  "text[]" ..MUST have GRAPHICS+SPACE (inverted SPACE) as string terminator
x_4x6             = 22304  x miniprint coordinate (use POKE)
y_4x6             = 22306  y miniprint coordinate (use POKE)

; text/video effects
_zx_invtxt        = 18403  inverts the picture in text mode
_zx_mirrortxt     = 18418  mirrors the text horizontally (font is not flipped)
_zx_filltxt       = 18433  arg: the numeric code of the character used to fill the screen, e.g.  CODE "A", or 8
_zx_rollchr       = 18465  (not working?) tweaks the video generator to roll the text display, '0'= normal position
_zx_scrolluptxt   = 18493  scroll up
_zx_scrolldowntxt = 18508  scroll down

;  turtle graphics
_zx_pen_up        = 18651  the next "zx_fwd" will trace a line
_zx_pen_down      = 18666  the next "zx_fwd" will move without drawing
_zx_move          = 18681  x,y
_zx_set_direction = 18785  clockwise progression, e.g EAST=0, SOUTH=90, WEST=180, NORTH=270
_zx_fwd           = 18813  make your turtle walk, n steps
_zx_turn_left     = 18841  arg: degrees
_zx_turn_right    = 18869  arg: degrees

;  picture blitting (possibly not working yet)
_zx_putsprite     = 18897  x,y,sprite data: e.g. CHR$ 8 + CHR$ 8 + "AAAAAAAA"
_zx_andsprite     = 18950
_zx_xorsprite     = 19004
_zx_getsprite     = 19057  x,y,sprite data.  The sprite data must be pre-initialized with expected size and a default content.

Attachments
demo2.png
demo.png
LAMBDA_OLDROM_TOOLKIT.P
(5.8 KiB) Downloaded 209 times
CAC3_TOOLKIT.P
(5.79 KiB) Downloaded 210 times
LAMBDA_TOOLKIT.P
(5.97 KiB) Downloaded 213 times
Post Reply