diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3b04df8 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +myprog.sna myprog.sld: main.asm + sjasmplus --sld=myprog.sld --fullpath main.asm + +clean: + rm -rf *.sna + rm -rf *.sld + rm -rf .tmp/ + +.PHONY: clean \ No newline at end of file diff --git a/main.asm b/main.asm new file mode 100644 index 0000000..d3cbca3 --- /dev/null +++ b/main.asm @@ -0,0 +1,47 @@ +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 \ No newline at end of file