From 9f92abab8f0fa54c1058c940ddaeeb4e3b1bb9b6 Mon Sep 17 00:00:00 2001 From: Pedro de Oliveira Date: Sun, 17 Aug 2014 05:15:36 +0100 Subject: [PATCH] bleh --- starfield/main.asm | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/starfield/main.asm b/starfield/main.asm index 29d9def..f38802b 100644 --- a/starfield/main.asm +++ b/starfield/main.asm @@ -2,24 +2,23 @@ org $7530 ; System variables -tv_flag equ $5c3c ; TV flags -last_k equ $5c08 ; Last pressed key -clr_screen equ $0daf ; ROM routine to clear the screen +tv_flag EQU $5c3c ; TV flags +last_k EQU $5c08 ; Last pressed key +clr_screen EQU $0daf ; ROM routine to clear the screen ; Video RAM -LINHA9 equ $4820 -LINHA10 equ $4840 -LINHA11 equ $4860 +LINHA9 EQU $4820 +LINHA10 EQU $4840 +LINHA11 EQU $4860 ; Star Structure -; X - 1 Byte -; Y - 1 Byte +; X - 1 Byte - $00 - $ff +; Y - 1 Byte - $00 - $bf ; Z - 1 Byte ; Color - 1 Byte -STAR_SIZE equ $4 -MAX_STARS equ 10 -STARS ds STAR_SIZE * MAX_STARS, 0 - +STAR_SIZE EQU $4 +MAX_STARS EQU 10 +STARS DS STAR_SIZE * MAX_STARS, 0 start xor a ; a = 0 @@ -37,6 +36,7 @@ start pop bc ; Get BC out of the stack ret ; Exit to BASIC +PROC INITIALIZE_STARS push bc ld b, MAX_STARS @@ -54,7 +54,10 @@ INITIALIZE_STARS_LOOP djnz INITIALIZE_STARS_LOOP pop bc ret +ENDP +PROC INCLUDE "clear.asm" +ENDP -end start +END start \ No newline at end of file