mirror of
https://github.com/mach-kernel/mrbuffer.git
synced 2024-11-21 14:31:12 +00:00
some minor cleanup before i refactor it again
also implemented backspace
This commit is contained in:
parent
8305686468
commit
f1b1cb084d
54
src/main.S
54
src/main.S
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user