add some comments for jimmy <3

This commit is contained in:
2019-04-04 18:00:32 +11:00
parent 1d53530544
commit f92b2a52a8

View File

@@ -4,18 +4,18 @@
sei ; no interrupts pls
ldx #$00 ; Screen colours
ldx #$00 ; screen colours
stx bdcol
ldx #$08
stx bgcol
jsr $e544 ; clear screen
lda #> message ; print message
pha
lda #> message ; push the location of the text
pha ; to display onto the stack
lda #< message
pha
jsr print_string
jsr print_string ; call the actual print subroutine
pla
pla
@@ -27,7 +27,7 @@
;stx ch1_ctl
.loop
inc bdcol
inc bdcol ; flashing gobbledygook garbage (scat)
lda inputb ; Scans the keyboard buffer
cmp #$EF ; If user presses Space ($ef) then quit
@@ -39,18 +39,20 @@
rts
print_string:
tsx
tsx ; load the stack pointer
inx ; traverse upwards to our arguments
inx
inx
inx
lda stack, x
sta PSL + 1
inx
lda stack, x ; copy the arguments on the stack
sta PSL + 1 ; on top of the instruction that
inx ; needs to point to the text
lda stack, x
sta PSL + 2
ldx #$00
PSL lda message, x
PSL lda $0000, x ; this instruction's operand is
; modified by the code above
cmp #$0 ; return on null terminator
beq +
sta screen + rowlen, x