Add full compiler toolchain, libc, examples and reference docs
First substantive commit: the entire Sprinter C compiler tree on top of
the bare README+gitignore initial commit.
What's in here:
bin/sprinter-cc — driver script invoking SDCC + linker + mkexe
libc/ — Sprinter-specific libc layer over ESTEX/BIOS
(conio, gfx, io, mem, stdio + headers)
runtime/ — crt0 variants (default/small/banked/minimal)
+ heap + bank trampolines
toolchain/ — mkexe (SprintEXE packer, C + tests)
examples/ — 30 demo programs (gfx, file I/O, env, time, …)
lib/Makefile — builds the libc archive (sprinter.lib)
docs/ — converted Sprinter manuals + asm reference samples
third_party/ — solid-c reference compiler dump + sdcc setup script
release_docs/ — packaging / release notes
gitignore overhaul:
• Drop dangerous blanket patterns: *.asm (would hide docs/samples/*.asm)
and *.exe (case-insensitive match was hiding third_party/solid-c/*.EXE
on macOS APFS). Replaced with examples/*/*.{asm,exe,…} and lib/*.lib.
• Restore tracking of toolchain/mkexe/tests/{one,big}.bin — those are
INPUT fixtures, not build outputs.
• Collapse the duplicated SDCC/C/Sdcc sections into one section per
concern (build outputs / vendored / OS-junk).
• Add .sprinter-cc-*/, build/ (catches lib/build/ too), .claude/.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,521 @@
|
||||
;Part 2. Graphic samples. Subprograms of low level.
|
||||
|
||||
;Print string (text line) at the screen
|
||||
;IY- addr. of the text line
|
||||
;HL-x
|
||||
;b-y,c- colour
|
||||
pline
|
||||
ld (plinex),hl
|
||||
ld a,c
|
||||
cp #ff
|
||||
jr z,pline
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
or c
|
||||
ld (printcol),a
|
||||
pline1
|
||||
ld a,(IY)
|
||||
cp 0
|
||||
ret z
|
||||
cp #16
|
||||
jp z,plinecoor
|
||||
cp #0d
|
||||
jp z,pline_cr
|
||||
cp #0A
|
||||
jp z,pline_lf
|
||||
cp #17
|
||||
jp z,pline_tab
|
||||
call print
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
|
||||
inc IY
|
||||
jp pline1
|
||||
|
||||
|
||||
|
||||
|
||||
pline_tab
|
||||
push bc
|
||||
ld b,24
|
||||
pline_tab1
|
||||
inc hl
|
||||
djnz pline_tab1
|
||||
pop bc
|
||||
jp pline1
|
||||
|
||||
pline_lf
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
|
||||
inc IY
|
||||
jp pline1
|
||||
|
||||
pline_cr
|
||||
ld hl,(plinex)
|
||||
inc IY
|
||||
jp pline1
|
||||
|
||||
plinecoor
|
||||
inc IY
|
||||
ld a,(IY)
|
||||
ld b,a
|
||||
ld a,(IY+1)
|
||||
ld l,a
|
||||
ld a,(IY+2)
|
||||
ld h,a
|
||||
inc IY
|
||||
inc IY
|
||||
inc IY
|
||||
jp pline1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
plinex defw 0
|
||||
|
||||
|
||||
|
||||
print_tab
|
||||
;Print to symbol positions
|
||||
;B-y. C - x
|
||||
;A - symbol
|
||||
;Colour - last
|
||||
|
||||
push af
|
||||
push bc
|
||||
ld b,c
|
||||
ld hl,0
|
||||
ld de,6
|
||||
print_tab1
|
||||
add hl,de
|
||||
djnz pline_tab1
|
||||
pop bc
|
||||
ld c,#ff
|
||||
pop af
|
||||
jp print
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;Print to the screen (Pixels coordinates).
|
||||
;6x8 pixels
|
||||
print
|
||||
;HL-x
|
||||
;B-y
|
||||
;C-colour, #FF - no change
|
||||
;A-symbol
|
||||
|
||||
push ix
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
ld ix,printchar
|
||||
ld (ix),a
|
||||
srl h
|
||||
rr l
|
||||
ld (ix+1),l
|
||||
ld (ix+2),h
|
||||
ld (ix+3),b
|
||||
bit 7,c
|
||||
call z,prncolor_change
|
||||
call open_video_mem
|
||||
ld a,(ix)
|
||||
ld h,0
|
||||
ld l,a
|
||||
add hl,hl
|
||||
add hl,hl
|
||||
add hl,hl
|
||||
ex de,hl
|
||||
ld hl,font
|
||||
add hl,de
|
||||
ld (ix+4),l
|
||||
ld (ix+5),h
|
||||
; Loop of 8 pixels at the screen
|
||||
ld a,8
|
||||
print_lines
|
||||
push af
|
||||
ld d,(ix+2)
|
||||
ld e,(ix+1)
|
||||
ld hl,#4000
|
||||
add hl,de
|
||||
ld (pcuradr),hl
|
||||
ld (pcuradr1),hl
|
||||
ld a,(ix+3)
|
||||
out (port_y),a
|
||||
ld l,(ix+4)
|
||||
ld h,(ix+5)
|
||||
ld a,(hl)
|
||||
ld c,a
|
||||
ld a,3
|
||||
print_point
|
||||
push af
|
||||
ld hl,(pcuradr1)
|
||||
ld a,(hl)
|
||||
sla c
|
||||
jr nc,ppoint1
|
||||
and %00001111
|
||||
ld b,(ix+6)
|
||||
push af
|
||||
ld a,b
|
||||
and %11110000
|
||||
ld b,a
|
||||
pop af
|
||||
or b
|
||||
ppoint1
|
||||
sla c
|
||||
jr nc,ppoint2
|
||||
and %11110000
|
||||
ld b,(ix+6)
|
||||
push af
|
||||
ld a,b
|
||||
and %00001111
|
||||
ld b,a
|
||||
pop af
|
||||
or b
|
||||
ppoint2
|
||||
ld (hl),a
|
||||
inc hl
|
||||
ld (pcuradr1),hl
|
||||
pop af
|
||||
dec a
|
||||
jp nz,print_point
|
||||
ld a,(ix+3)
|
||||
inc a
|
||||
ld (ix+3),a
|
||||
ld h,(ix+5)
|
||||
ld l,(ix+4)
|
||||
inc hl
|
||||
ld (ix+5),h
|
||||
ld (ix+4),l
|
||||
ld hl,(pcuradr)
|
||||
ld (pcuradr1),hl
|
||||
pop af
|
||||
dec a
|
||||
jp nz,print_lines
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
pop ix
|
||||
|
||||
ret
|
||||
|
||||
prncolor_change
|
||||
ld a,c
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
or c
|
||||
ld (ix+6),a
|
||||
ret
|
||||
|
||||
|
||||
|
||||
pcuradr defw 0
|
||||
pcuradr1 defw 0
|
||||
printchar defb 0
|
||||
printx defw 0
|
||||
printy defb 0
|
||||
printfnt defw 0
|
||||
printcol defb 0
|
||||
|
||||
|
||||
|
||||
|
||||
;Paint the point (dot).
|
||||
set_point
|
||||
;HL-x D-y, E-colour
|
||||
|
||||
push hl
|
||||
push de
|
||||
|
||||
push de
|
||||
ld a,e
|
||||
sla e
|
||||
sla e
|
||||
sla e
|
||||
sla e
|
||||
or e
|
||||
ld (modcolor),a
|
||||
pop de
|
||||
ld a,d
|
||||
ld (pointy),a
|
||||
push hl
|
||||
srl h
|
||||
rr l
|
||||
ld (movex),hl
|
||||
pop hl
|
||||
bit 0,l
|
||||
jp z,set_point_p
|
||||
jp set_point_np
|
||||
set_point_p
|
||||
ld a,%11110000
|
||||
ld (set_point_cm),a
|
||||
xor #ff
|
||||
ld (set_point_sm),a
|
||||
jp set_point_put
|
||||
|
||||
|
||||
set_point_np
|
||||
ld a,%00001111
|
||||
ld (set_point_cm),a
|
||||
xor #ff
|
||||
ld (set_point_sm),a
|
||||
jp set_point_put
|
||||
|
||||
|
||||
|
||||
set_point_put
|
||||
|
||||
call open_video_mem
|
||||
ld a,(pointy)
|
||||
out (port_y),a
|
||||
ld hl,(movex)
|
||||
ld d,h
|
||||
ld e,l
|
||||
ld hl,#4000
|
||||
add hl,de
|
||||
ld a,(hl)
|
||||
and 0
|
||||
set_point_sm equ $-1
|
||||
ld e,a
|
||||
ld a,(modcolor)
|
||||
and 0
|
||||
set_point_cm equ $-1
|
||||
or e
|
||||
ld (hl),a
|
||||
call close_video_mem
|
||||
pop de
|
||||
pop hl
|
||||
|
||||
ret
|
||||
|
||||
modcolor defb 0
|
||||
pointy defb 0
|
||||
movex defw 0
|
||||
|
||||
;Paint horizontal line
|
||||
horline
|
||||
call open_video_mem
|
||||
|
||||
push de
|
||||
ld d,h
|
||||
ld e,l
|
||||
ld hl,#4000
|
||||
srl d
|
||||
rr e
|
||||
add hl,de
|
||||
pop de
|
||||
ld a,d
|
||||
out (port_y),a
|
||||
ld a,e
|
||||
sla a
|
||||
sla a
|
||||
sla a
|
||||
sla a
|
||||
or e
|
||||
ld (hl),a
|
||||
ld d,h
|
||||
ld e,l
|
||||
inc de
|
||||
srl b
|
||||
rr c
|
||||
ldir
|
||||
|
||||
call close_video_mem
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
verline
|
||||
;HL-x, D-y, E-colour, B-length
|
||||
call set_point
|
||||
inc d
|
||||
djnz verline
|
||||
ret
|
||||
|
||||
|
||||
box
|
||||
;HL-x,D-y,E-colour, BC-length, A-height
|
||||
push af
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
call horline
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
pop af
|
||||
push af
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
add a,d
|
||||
ld d,a
|
||||
call horline
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
pop af
|
||||
push af
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld b,a
|
||||
call verline
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
pop af
|
||||
add hl,bc
|
||||
ld b,a
|
||||
call verline
|
||||
ret
|
||||
|
||||
|
||||
|
||||
fbox
|
||||
;HL-x,D-y,E-colour, BC-length, A-height
|
||||
push ix
|
||||
call open_video_mem
|
||||
ld ix,box_x
|
||||
;Loading of variables
|
||||
res 0,c
|
||||
srl b
|
||||
rr c
|
||||
ld (ix+3),c
|
||||
ld (ix+4),b
|
||||
res 0,l
|
||||
srl h
|
||||
rr l
|
||||
ld (ix+1),h
|
||||
ld (ix),l
|
||||
ld (ix+2),d
|
||||
ld (ix+5),a
|
||||
ld a,e
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
or e
|
||||
ld (ix+6),a
|
||||
|
||||
fbox1
|
||||
ld a,(ix+2)
|
||||
out (port_y),a
|
||||
inc a
|
||||
ld (ix+2),a
|
||||
ld d,(ix+1)
|
||||
ld e,(ix)
|
||||
ld hl,#4000
|
||||
add hl,de
|
||||
ld d,h
|
||||
ld e,l
|
||||
inc de
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld a,(ix+6)
|
||||
ld (hl),a
|
||||
ldir
|
||||
ld a,(ix+5)
|
||||
dec a
|
||||
jr z,fbox2
|
||||
ld (ix+5),a
|
||||
jp fbox1
|
||||
fbox2
|
||||
pop ix
|
||||
call close_video_mem
|
||||
ret
|
||||
|
||||
box_x defw 0 ;+0 +1
|
||||
box_y defb 0 ;+2
|
||||
box_l defw 0 ;+3 +4
|
||||
box_h defb 0 ;+5
|
||||
box_c defb 0 ;+6
|
||||
|
||||
|
||||
putspr
|
||||
;HL-x, D-y, E-empty, BC-length, A - height, iy - address
|
||||
call open_video_mem1
|
||||
ld (spr_adr),iy
|
||||
ld iy,spr_cox
|
||||
srl h
|
||||
rr l
|
||||
ld (iy),l
|
||||
ld (iy+1),h
|
||||
srl b
|
||||
rr c
|
||||
ld (iy+4),b
|
||||
ld (iy+3),c
|
||||
ld (iy+2),d
|
||||
ld (iy+5),a
|
||||
|
||||
putspr1
|
||||
ld a,(iy+2)
|
||||
out (port_y),a
|
||||
ld d,(iy+1)
|
||||
ld hl,#4000
|
||||
ld d,(iy+1)
|
||||
ld e,(iy)
|
||||
add hl,de
|
||||
ld d,h
|
||||
ld e,l
|
||||
ld hl,(spr_adr)
|
||||
ld b,(iy+4)
|
||||
ld c,(iy+3)
|
||||
|
||||
ldir
|
||||
ld (spr_adr),hl
|
||||
ld a,(spr_hei)
|
||||
dec a
|
||||
ret z
|
||||
ld (spr_hei),a
|
||||
ld a,(iy+2)
|
||||
inc a
|
||||
ld (iy+2),a
|
||||
jp putspr1
|
||||
call close_video_mem
|
||||
ret
|
||||
|
||||
|
||||
|
||||
spr_cox defw 0 ;+0 +1
|
||||
spr_coy defb 0 ;+2
|
||||
spr_len defw 0 ;+3 +4
|
||||
spr_hei defb 0 ;+5
|
||||
spr_adr defw 0 ;+6 +7
|
||||
|
||||
|
||||
|
||||
getspr
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Sources of sample text editor for Sprinter computer.
|
||||
Free for usage.
|
||||
|
||||
This is example of programming for the 640x256 graphic mode of Sprinter computer.
|
||||
It need Asm80Win cross-assembler. You will found it in this archive.
|
||||
|
||||
Also, archive include already compiled program 'ed.exe' for Sprinter computer.
|
||||
|
||||
Compiling your variant of editor.
|
||||
Create directory 'C:\speccy\aedit\' and put archive contents in it.
|
||||
Execute Asm80Win.exe and input name of 'editor.a80' file.
|
||||
Then rename 'editor.bin' file to 'editor.exe' file and execute this new program on Sprinter computer.
|
||||
|
||||
If you have any questions, ask us at the webforum: www.forum.petersplus.ru
|
||||
|
||||
|
||||
---
|
||||
Sprinter Team.
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
;Subprograms
|
||||
|
||||
set_vmode
|
||||
ld a,#82
|
||||
ld bc,#50
|
||||
rst #10
|
||||
ret
|
||||
|
||||
|
||||
open_video_mem
|
||||
push af
|
||||
in a,(win1)
|
||||
ld (previous),a
|
||||
ld a,#50
|
||||
out (win1),a
|
||||
pop af
|
||||
ret
|
||||
|
||||
open_video_mem1
|
||||
push af
|
||||
in a,(win1)
|
||||
ld (previous),a
|
||||
ld a,#58
|
||||
out (win1),a
|
||||
pop af
|
||||
ret
|
||||
|
||||
close_video_mem
|
||||
push af
|
||||
ld a,(previous)
|
||||
out (win1),a
|
||||
pop af
|
||||
ret
|
||||
|
||||
|
||||
previous defb 0
|
||||
|
||||
clear_screen
|
||||
ld b,a
|
||||
and %00001111
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
rlca
|
||||
or b
|
||||
ld (clear_color),a
|
||||
in a,(win1)
|
||||
push af
|
||||
ld a,#50
|
||||
out (win1),a
|
||||
ld b,0
|
||||
clear_screen1 push bc
|
||||
ld a,b
|
||||
out (port_y),a
|
||||
ld hl,#4000
|
||||
ld de,#4001
|
||||
ld bc,320
|
||||
ld a,0
|
||||
clear_color equ $-1
|
||||
ld (hl),a
|
||||
ldir
|
||||
pop bc
|
||||
djnz clear_screen1
|
||||
pop af
|
||||
out (win1),a
|
||||
ret
|
||||
|
||||
|
||||
wait_a_key
|
||||
ld c,#30
|
||||
rst #10
|
||||
ret
|
||||
|
||||
wait_q_key
|
||||
ld c,#31
|
||||
rst #10
|
||||
jr z,wait_q_key
|
||||
cp "Q"
|
||||
ret z
|
||||
cp "q"
|
||||
ret z
|
||||
jp wait_q_key
|
||||
|
||||
wait_a_click
|
||||
push af
|
||||
;waitclick1
|
||||
; ld a,(mouse_keys)
|
||||
; bit 0,a
|
||||
; jr z,waitclick1
|
||||
; pop af
|
||||
; ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
setpalette
|
||||
;Set your palette
|
||||
ld hl,palette ;Addr. of palette
|
||||
ld e,0 ;Start colour
|
||||
ld d,16 ;Quantity of colours (16 colours for 640x256 mode)
|
||||
ld b,#ff ;Palette mask
|
||||
ld a,0 ;Palette page
|
||||
ld c,#a4 ;System function
|
||||
rst #8 ;Call BIOS
|
||||
ret
|
||||
palette
|
||||
;b,g,r,0
|
||||
;16 colours of your palette
|
||||
; BBB GGG RRR
|
||||
defb #00,#00,#00,#00 ;0 -Black
|
||||
defb #BF,#00,#00,#00 ;1 -
|
||||
defb #00,#00,#FF,#00 ;2 -Red
|
||||
defb #FF,#00,#FF,#00 ;3 -
|
||||
defb #00,#BF,#00,#00 ;4 -Green
|
||||
defb #DF,#DF,#00,#00 ;5 -
|
||||
defb #00,#FF,#FF,#00 ;6 -
|
||||
defb #FF,#FF,#FF,#00 ;7 -White
|
||||
defb #7F,#7F,#7F,#00 ;8 -
|
||||
defb #BF,#BF,#BF,#00 ;9 -Gray
|
||||
defb #DF,#DF,#DF,#00 ;10-
|
||||
defb #97,#97,#97,#00 ;11-Dark gray
|
||||
defb #00,#00,#00,#00 ;12-
|
||||
defb #00,#00,#00,#00 ;13-
|
||||
defb #00,#00,#00,#00 ;14-
|
||||
defb #00,#00,#00,#00 ;15-
|
||||
|
||||
|
||||
font
|
||||
*B c:\speccy\aedit\6x8.fnt
|
||||
;*B 6x8.fnt
|
||||
|
||||
@@ -0,0 +1,550 @@
|
||||
;Window interface
|
||||
|
||||
|
||||
;Subprograms of high level.
|
||||
|
||||
mblock defb 0 ;# identification of memory block for pages
|
||||
mpage defb 0 ;# current free page
|
||||
opened defb 0 ;Quantity of opened windows
|
||||
numbers defs 10 ;Buffer of numbers of opened windows
|
||||
|
||||
|
||||
win_init
|
||||
ld c,#3d
|
||||
ld b,4
|
||||
rst #10
|
||||
ld (mblock),a
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
windraw
|
||||
;IX-win data
|
||||
;+
|
||||
;0,1 - x
|
||||
;2 - y
|
||||
;3,4 - Dx
|
||||
;5 - Dy
|
||||
;6,7 - Header line address; 0= no header
|
||||
;8 - SetUp, Don't touch it!!!
|
||||
; Bit 7 - Safe back screen
|
||||
; Bit 0 - 4 Number of buttons set for this window.
|
||||
;9,10 - Addr. of buffer of back screen
|
||||
;11 - number of memory block for windows buffer
|
||||
;12 - Number of page in the block (page which include buffer)
|
||||
;13,14 - Addr. of block of objects descriptions
|
||||
|
||||
call hide_cursor
|
||||
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld a,(ix+5)
|
||||
call sqrw
|
||||
|
||||
ld h,(ix+7)
|
||||
ld l,(ix+6)
|
||||
ld a,h
|
||||
or l
|
||||
jr z,windraw1
|
||||
push hl
|
||||
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
inc hl
|
||||
inc hl
|
||||
ld d,(ix+2)
|
||||
inc d
|
||||
inc d
|
||||
ld a,10
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
dec bc
|
||||
dec bc
|
||||
dec bc
|
||||
dec bc
|
||||
ld e,1
|
||||
call fbox
|
||||
pop iy
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
inc hl
|
||||
inc hl
|
||||
inc hl
|
||||
ld b,(ix+2)
|
||||
inc b
|
||||
inc b
|
||||
inc b
|
||||
ld c,7
|
||||
call pline
|
||||
|
||||
windraw1
|
||||
;Painting objects
|
||||
ld h,(ix+14)
|
||||
ld l,(ix+13)
|
||||
push ix
|
||||
push hl
|
||||
pop ix
|
||||
call windraw_objects
|
||||
pop ix
|
||||
; call v_mouse
|
||||
call unhide_cursor
|
||||
ret
|
||||
|
||||
|
||||
|
||||
windraw_objects
|
||||
;Loop. Calculating: what is the object?, then send it to the right subprogram
|
||||
;At the last, chack: is it all objects?
|
||||
ld a,(ix+0)
|
||||
cp #FF
|
||||
ret z
|
||||
cp 0
|
||||
jp z,wd_key
|
||||
cp 1
|
||||
jp z,wd_spr ;Sprite
|
||||
cp 2
|
||||
jp z,wd_inline ;Input text line
|
||||
; cp 3
|
||||
; jp z,wd_radio ;Trigger
|
||||
cp 4
|
||||
jp z,wd_flag ;Flag
|
||||
cp 5
|
||||
jp z,wd_grayarea ;Gray place
|
||||
cp 6
|
||||
jp z,wd_txtarea ;White place
|
||||
cp 7
|
||||
jp z,wd_txtline ;Text
|
||||
cp 11
|
||||
jp z,wd_hr ;Hor. line
|
||||
cp 12
|
||||
jp z,wd_vr ;Vert. line
|
||||
|
||||
|
||||
ret
|
||||
|
||||
wd_txtline
|
||||
inc ix
|
||||
ld h,(ix+4)
|
||||
ld l,(ix+3)
|
||||
push hl
|
||||
pop iy
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld b,(ix+2)
|
||||
ld c,0
|
||||
call pline
|
||||
inc ix
|
||||
inc ix
|
||||
; inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
wd_flag
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld bc,16
|
||||
ld a,10
|
||||
ld iy,check_box
|
||||
push hl
|
||||
call putspr
|
||||
ld h,(ix+4)
|
||||
ld l,(ix+3)
|
||||
push hl
|
||||
pop iy
|
||||
pop hl
|
||||
ld de,18
|
||||
add hl,de
|
||||
ld b,(ix+2)
|
||||
ld c,0
|
||||
call pline
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
wd_inline
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
dec hl
|
||||
ld d,(ix+2)
|
||||
dec d
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
inc bc
|
||||
inc bc
|
||||
ld a,12
|
||||
call sqrtxt
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
wd_txtarea
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld a,(ix+5)
|
||||
call sqrtxt
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
|
||||
|
||||
wd_grayarea
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld a,(ix+5)
|
||||
call sqrd
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
|
||||
;wd_radio
|
||||
; inc ix
|
||||
; ld h,(ix+1)
|
||||
; ld l,(ix+0)
|
||||
; ld d,(ix+2)
|
||||
; ld bc,14
|
||||
; ld a,10
|
||||
; ld iy,radio_button
|
||||
; push hl
|
||||
; call putspr
|
||||
; ld h,(ix+4)
|
||||
; ld l,(ix+3)
|
||||
; push hl
|
||||
; pop iy
|
||||
; pop hl
|
||||
; ld de,18
|
||||
; add hl,de
|
||||
; ld b,(ix+2)
|
||||
; ld c,0
|
||||
; call pline
|
||||
; inc ix
|
||||
; inc ix
|
||||
; inc ix
|
||||
; inc ix
|
||||
; inc ix
|
||||
; jp windraw_objects
|
||||
|
||||
|
||||
|
||||
wd_hr
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld e,11
|
||||
call horline
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
inc d
|
||||
ld e,10
|
||||
call horline
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
wd_vr
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld a,(ix+3)
|
||||
ld e,11
|
||||
call verline
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld a,(ix+3)
|
||||
inc a
|
||||
ld e,10
|
||||
call verline
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
|
||||
wd_key
|
||||
inc ix
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld bc,52
|
||||
ld a,12
|
||||
call sqrw
|
||||
|
||||
ld h,(ix+4)
|
||||
ld l,(ix+3)
|
||||
ld (wd_key3),hl
|
||||
|
||||
ld b,0
|
||||
wd_key1
|
||||
ld a,(hl)
|
||||
or a
|
||||
jp z,wd_key2
|
||||
inc b
|
||||
inc hl
|
||||
jp wd_key1
|
||||
wd_key2
|
||||
ld de,24
|
||||
ld c,b
|
||||
ld b,0
|
||||
sla c
|
||||
rlc b
|
||||
sla c
|
||||
rlc b
|
||||
sla c
|
||||
rlc b
|
||||
|
||||
sub de,bc
|
||||
srl d
|
||||
rr e
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
inc hl
|
||||
inc hl
|
||||
add hl,de
|
||||
ld b,(ix+2)
|
||||
inc b
|
||||
inc b
|
||||
ld c,0
|
||||
ld iy,0
|
||||
wd_key3 equ $-2
|
||||
call pline
|
||||
ld bc,5
|
||||
add ix,bc
|
||||
jp windraw_objects
|
||||
|
||||
wd_spr
|
||||
inc ix
|
||||
ld h,(ix+7)
|
||||
ld l,(ix+6)
|
||||
push hl
|
||||
pop iy
|
||||
ld h,(ix+1)
|
||||
ld l,(ix+0)
|
||||
ld d,(ix+2)
|
||||
ld b,(ix+4)
|
||||
ld c,(ix+3)
|
||||
ld a,(ix+5)
|
||||
call putspr
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
inc ix
|
||||
jp windraw_objects
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wintable
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
defw 0
|
||||
|
||||
|
||||
|
||||
|
||||
sqrw
|
||||
;HL - X
|
||||
;D - Y
|
||||
;BC - DX
|
||||
;A - Dy
|
||||
ld e,9
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call fbox
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,8
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call box
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
dec bc
|
||||
ld e,7
|
||||
call horline
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,7
|
||||
ld b,a
|
||||
dec b
|
||||
call verline
|
||||
ret
|
||||
|
||||
sqrtxt
|
||||
;HL - X
|
||||
;D - Y
|
||||
;BC - DX
|
||||
;A - Dy
|
||||
ld e,7
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call fbox
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,7
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call box
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
dec bc
|
||||
ld e,11
|
||||
call horline
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,11
|
||||
ld b,a
|
||||
dec b
|
||||
call verline
|
||||
ret
|
||||
|
||||
|
||||
sqrd
|
||||
;HL - X
|
||||
;D - Y
|
||||
;BC - DX
|
||||
;A - Dy
|
||||
ld e,9
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call fbox
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,7
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
call box
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
ld e,8
|
||||
call horline
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld e,8
|
||||
ld b,a
|
||||
call verline
|
||||
ret
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
This program for Sprinter computer!
|
||||
Reference in New Issue
Block a user