mirror of
https://github.com/mach-kernel/mrbuffer.git
synced 2024-11-22 05:31:37 +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
|
ldx #0
|
||||||
ldal $00C010
|
ldal $00C010
|
||||||
|
|
||||||
inloop clc
|
:kloop clc
|
||||||
ldal $00C000
|
ldal $00C000
|
||||||
bit #%1
|
bit #%1
|
||||||
bmi keybranch
|
bmi :kjump
|
||||||
jmp inloop
|
jmp :kloop
|
||||||
keybranch jsr keydown
|
:kjump jsr keydown
|
||||||
jmp inloop
|
jmp :kloop
|
||||||
|
|
||||||
keydown nop
|
keydown nop
|
||||||
cmp #$8B ; up
|
cmp #$8B ; up
|
||||||
@ -48,8 +48,21 @@ keydown nop
|
|||||||
beq left
|
beq left
|
||||||
cmp #$95 ; right
|
cmp #$95 ; right
|
||||||
beq right
|
beq right
|
||||||
|
cmp #$FF ; backspace
|
||||||
|
beq backspace
|
||||||
|
cmp #$8D ; return
|
||||||
|
beq down
|
||||||
jmp dispchar
|
jmp dispchar
|
||||||
|
|
||||||
|
backspace clc
|
||||||
|
cpx #0
|
||||||
|
bne :drop
|
||||||
|
jmp :out
|
||||||
|
:drop dex
|
||||||
|
:out lda #$A0
|
||||||
|
stal $000400,X
|
||||||
|
jmp rtsout
|
||||||
|
|
||||||
up clc
|
up clc
|
||||||
phy
|
phy
|
||||||
ldy #0
|
ldy #0
|
||||||
@ -71,12 +84,12 @@ updown clc
|
|||||||
pha
|
pha
|
||||||
txa
|
txa
|
||||||
cpy #0
|
cpy #0
|
||||||
beq linedown
|
beq :ldown
|
||||||
bne lineup
|
bne :lup
|
||||||
lineup adc #128
|
:lup adc #128
|
||||||
jmp linecont
|
jmp :lcont
|
||||||
linedown sbc #128
|
:ldown sbc #128
|
||||||
linecont tax
|
:lcont tax
|
||||||
pla
|
pla
|
||||||
sep #$20
|
sep #$20
|
||||||
jmp rtsout
|
jmp rtsout
|
||||||
@ -132,4 +145,23 @@ QP adrl $0000
|
|||||||
hithere strl "this was excruciating"
|
hithere strl "this was excruciating"
|
||||||
brkboi brk
|
brkboi brk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user