47 lines
1009 B
NASM
47 lines
1009 B
NASM
code_start_addr EQU #8000
|
|
ORG code_start_addr
|
|
|
|
ink_blue EQU 1
|
|
paper_blue EQU 8
|
|
ink_white EQU 7
|
|
paper_white EQU 56
|
|
ink_red EQU 2
|
|
paper_red EQU 16
|
|
bright EQU 64
|
|
attribute_start EQU #5800
|
|
stripe_width EQU 11
|
|
stripe_height EQU 24
|
|
screen_width EQU 32
|
|
|
|
; blue stripe first
|
|
ld hl, attribute_start ; top left corner
|
|
ld a, ink_blue | paper_blue | bright
|
|
call make_stripe
|
|
; white
|
|
ld hl, attribute_start + stripe_width
|
|
ld a, ink_white | paper_white | bright
|
|
call make_stripe
|
|
; red
|
|
ld hl, attribute_start + stripe_width * 2
|
|
ld a, ink_red | paper_red | bright
|
|
call make_stripe
|
|
eternal_pause:
|
|
jr eternal_pause
|
|
|
|
make_stripe:
|
|
ld c, stripe_height
|
|
vertical_loop:
|
|
ld b, stripe_width
|
|
horizontal_loop:
|
|
ld (hl), a
|
|
inc hl
|
|
djnz horizontal_loop
|
|
ld de, screen_width - stripe_width
|
|
add hl, de
|
|
dec c
|
|
jr nz, vertical_loop
|
|
ret
|
|
|
|
DEVICE ZXSPECTRUM48
|
|
SLDOPT COMMENT WPMEM, LOGPOINT, ASSERTION
|
|
SAVESNA "myprog.sna", code_start_addr |