Contact me | Login | Search | Sitemap | Site Notice

JuMP-Table - Direct Library Access

With version 11.1 it is possible to access the library directly by storing the necessary variable data into certain memory locations and calling the single routine via a jump table with fixed adresses that will be maintained also in future versions of the library. For jump table data of V12 and V11 see below!

The following table gives the calling adresses in hex and dec which can be used for calling the routines directly from assembly or via a CALL-statement from AppleSoft-Basic:

JuMP Table Data V12:

FunctionHEXDECParameters
Init double LORES$701328691none
Exit double LORES$701628694none
Set drawing page$701928697page number (1/2): $E9 (233)
Move screen data from page to page$701C28700from screen (1-3): $7083 (28803)
to screen (1-3): $7084 (28804)
Clear 4 bottom text lines$701F28703none
Set display page$702228706page number (1/2): $E9 (233)
Fast total screen fill$702528709fill color (0-15): $E3 (227)
Horizontal line (HLIN)$702828712

Xfrom (0-79): $E0 (224)
Xto (0-79): $E7 (231)
Y (0-47): $E1 (225)
Color (0-15): $E3 (227)

Vertical line (VLIN)$702B28715

Yfrom (0-47): $E1 (225)
Yto (0-47): $E8 (232)
X (0-79): $E0 (224)
Color (0-15): $E3 (227)

SCRN-function$702E28718

X (0-79): $E0 (224)
Y (0-47): $E1 (225)
Pixel color (0-15, return value): $E9 (233)

Plot pixel$703128721

X (0-79): $E0 (224)
Y (0-47): $E1 (225)
Color (0-15): $E3 (227)

Fast line drawing$703428724

Xfrom (0-79): $E0 (224)
Xto (0-79): $E7 (231)
Yfrom (0-47): $E1 (225)
Yto (0-47): $E8 (232)
Color (0-15): $E3 (227)

Fast circle drawing$703728727

Midpoint X (0-79): $EC (236)
Midpoint Y (0-47): $ED (237)
Radius (0-255): $707A (28794)
Color (0-15): $E3 (227)

Fast disk drawing$703A28730

Midpoint X (0-79): $EC (236)
Midpoint Y (0-47): $ED (237)
Radius (0-255): $707A (28794)
Fill Color (0-15): $E3 (227)

Rectangle drawing$704628742

X1 (0-79): $E0 (224)
X2 (0-79): $E7 (231)
Y1 (0-47): $09 (9)
Y2 (0-47): $1F (31)
Color (0-15): $E3 (227)

Box drawing$703D28733X1 (0-79): $E0 (224)
X2 (0-79): $E7 (231)
Y1 (0-47): $E1 (225)
Y2 (0-47): $E8 (232)
Color (0-15): $E3 (227)
Flood fill algorithm$704028736

Seedpoint X (0-79): $707E (28798)
Seedpoint Y (0-47): $707F (28799)
New Color (0-15): $E3 (227)

Toggle mixed mode$704328739none
Grab new SPRITE$704928745

SPRITE number (1..16): $7093 (28819)
XFROM (0..79): $708D (28813)
XTO (0..79): $708E (28814)
YFROM (0..47): $708F (28815)
YTO (0..47): $7090 (28816)
MASK COLOR (0..15): $708B (28811)

Set MASK COLOR$704C28748MASK COLOR (0..15): $708B (28811)
Draw SPRITE$704F28751SPRITE number (1..16): $7093 (28819)
XPOS (0..239): $7094 (28820)
YPOS (0..143): $7095 (28821)
Delete SPRITE$705528757SPRITE number (1..16): $7093 (28819)
Store new SPRITE$705228754

SPRITE number (1..16): $7093 (28819)
SPRITE width (0..255): $7088 (28808)
SPRITE height (0.255): $7089 (28809)
MASK COLOR (0..15): $708B (28811)

 Be careful: when using the direct jump adresses with parameter injection via the memory locations you have to make sure that the parameters are in the valid range! 

JuMP Table Data V11:

FunctionHEXDECParameters
Init double LORES$801332787none
Exit double LORES$801632790none
Set drawing page$810932793page number (1/2): $E9 (233)
Move screen data from page to page$801C32796from screen (1-3): $8083 (32899)
to screen (1-3): $8084 (32900)
Clear 4 bottom text lines$801F32799none
Set display page$802232802page number (1/2): $E9 (233)
Fast total screen fill$802532805fill color (0-15): $E3 (227)
Horizontal line (HLIN)$802832808

Xfrom (0-79): $E0 (224)
Xto (0-79): $E7 (231)
Y (0-47): $E1 (225)
Color (0-15): $E3 (227)

Vertical line (VLIN)$802B32811

Yfrom (0-47): $E1 (225)
Yto (0-47): $E8 (232)
X (0-79): $E0 (224)
Color (0-15): $E3 (227)

SCRN-function$802E32814

X (0-79): $E0 (224)
Y (0-47): $E1 (225)
Pixel color (0-15, return value): $E9 (233)

Plot pixel$803132817

X (0-79): $E0 (224)
Y (0-47): $E1 (225)
Color (0-15): $E3 (227)

Fast line drawing$803432820

Xfrom (0-79): $E0 (224)
Xto (0-79): $E7 (231)
Yfrom (0-47): $E1 (225)
Yto (0-47): $E8 (232)
Color (0-15): $E3 (227)

Fast circle drawing$803732823

Midpoint X (0-79): $EC (236)
Midpoint Y (0-47): $ED (237)
Radius (0-255): $807A (32890)
Color (0-15): $E3 (227)

Fast disk drawing$803A32826

Midpoint X (0-79): $EC (236)
Midpoint Y (0-47): $ED (237)
Radius (0-255): $807A (32890)
Fill Color (0-15): $E3 (227)

Rectangle drawing$804632838

X1 (0-79): $E0 (224)
X2 (0-79): $E7 (231)
Y1 (0-47): $09 (9)
Y2 (0-47): $1F (31)
Color (0-15): $E3 (227)

Box drawing$803D32829X1 (0-79): $E0 (224)
X2 (0-79): $E7 (231)
Y1 (0-47): $E1 (225)
Y2 (0-47): $E8 (232)
Color (0-15): $E3 (227)
Flood fill algorithm$804032832

Seedpoint X (0-79): $807E (32894)
Seedpoint Y (0-47): $807F (32895)
New Color (0-15): $E3 (227)

Toggle mixed mode$804332835none

Be careful: when using the direct jump adresses with parameter injection via the memory locations you have to make sure that the parameters are in the valid range! 

AppleSoft Demo Programm

The following AppleSoft program gives a short demonstration of the direct library access by initializing double lores and drawing a yellow circle:

10 REM INIT DOUBLE LORES
20 CALL 32787
30 REM DRAW A CIRCLE
40 POKE 236,39 : REM MIDPOINT X
50 POKE 237,23 : REM MIDPOINT Y
60 POKE 32890,15: REM RADIUS
70 POKE 227,13 : REM COLOR
80 CALL 32823 : REM CALL CIRCLE FUNCTION
90 GET A$
100 CALL 32790 : REM EXIT DOUBLE LORES
110 END

Using the Ampersand-format yields a much shorter formulation of the same drawing task, however, the direct library access is likely to be faster since the Ampersand-routines perform a parameter check throwing errors when parameters are missing or out of range:

10 REM INIT DOUBLE LORES
20 &GR
30 REM DRAW A CIRCLE
40 &COLOR= 13
50 &C 39, 23, 15
90 GET A$
100 &TEXT : REM EXIT DOUBLE LORES
110 END