some minor cleanup before i refactor it again

also implemented backspace
This commit is contained in:
David Stancu 2018-02-06 20:04:16 -05:00
parent 8305686468
commit f1b1cb084d

View File

@ -31,13 +31,13 @@
ldx #0
ldal $00C010
inloop clc
:kloop clc
ldal $00C000
bit #%1
bmi keybranch
jmp inloop
keybranch jsr keydown
jmp inloop
bmi :kjump
jmp :kloop
:kjump jsr keydown
jmp :kloop
keydown nop
cmp #$8B ; up
@ -48,8 +48,21 @@ keydown nop
beq left
cmp #$95 ; right
beq right
cmp #$FF ; backspace
beq backspace
cmp #$8D ; return
beq down
jmp dispchar
backspace clc
cpx #0
bne :drop
jmp :out
:drop dex
:out lda #$A0
stal $000400,X
jmp rtsout
up clc
phy
ldy #0
@ -71,12 +84,12 @@ updown clc
pha
txa
cpy #0
beq linedown
bne lineup
lineup adc #128
jmp linecont
linedown sbc #128
linecont tax
beq :ldown
bne :lup
:lup adc #128
jmp :lcont
:ldown sbc #128
:lcont tax
pla
sep #$20
jmp rtsout
@ -132,4 +145,23 @@ QP adrl $0000
hithere strl "this was excruciating"
brkboi brk