A2osX/BIN/SH.S.HIS.txt

94 lines
1.6 KiB
Plaintext
Raw Normal View History

NEW
2019-06-02 08:58:46 +00:00
AUTO 3,1
2015-10-19 20:35:00 +00:00
.LIST OFF
*--------------------------------------
2019-04-01 06:07:56 +00:00
HIS.Init >LDYAI HISTORY.MAX Get a buffer for History
2020-02-02 18:24:40 +00:00
>SYSCALL NewStkObj
2015-10-19 20:35:00 +00:00
bcs .9
txa
>STA.G HIS.hBuf
2020-01-28 16:42:51 +00:00
2020-02-02 18:24:40 +00:00
>PUSHA
>PUSHWI 0
>SYSCALL StrVAdd Reset Buffer
>STZ.G HIS.Count
>STA.G HIS.Index
2015-10-19 20:35:00 +00:00
.9 rts
*--------------------------------------
HIS.Add >LDA.G HIS.hBuf
2015-10-19 20:35:00 +00:00
beq .9
2020-01-28 16:42:51 +00:00
2020-02-02 14:58:01 +00:00
>PUSHA
>PUSHW ZPCLBuf
>SYSCALL StrVAdd
bcc .1
>PUSHB.G HIS.hBuf
lda #0
>PUSHA
>SYSCALL StrVShift
>DEC.G HIS.Count
2020-02-02 14:58:01 +00:00
bra HIS.Add
.1 >STZ.G HIS.Index Reset Index
>INC.G HIS.Count
2020-02-07 12:53:46 +00:00
.9
2020-03-09 16:24:08 +00:00
HIS.Add.RTS rts
2015-10-19 20:35:00 +00:00
*--------------------------------------
HIS.GetPrev >LDA.G HIS.hBuf
2020-03-09 16:24:08 +00:00
beq HIS.Add.RTS
2020-02-02 14:58:01 +00:00
>LDA.G HIS.Count
2020-03-09 16:24:08 +00:00
beq HIS.Add.RTS empty history,nothing to do
2020-02-02 14:58:01 +00:00
>LDA.G HIS.Index
bne .1
2020-02-02 14:58:01 +00:00
>LDA.G HIS.Count
.1 dec
2020-02-02 14:58:01 +00:00
bra HIS.GetToCl
2015-10-19 20:35:00 +00:00
*--------------------------------------
HIS.GetNext >LDA.G HIS.hBuf
2020-03-09 16:24:08 +00:00
beq HIS.Add.RTS
2015-10-19 20:35:00 +00:00
>LDA.G HIS.Count
2020-03-09 16:24:08 +00:00
beq HIS.Add.RTS empty history,nothing to do
2020-02-02 14:58:01 +00:00
>LDA.G HIS.Index
inc
>CMP.G HIS.Count
2020-02-02 14:58:01 +00:00
bne HIS.GetToCl
lda #0
>STA.G HIS.Index
jmp CL.CLR
*--------------------------------------
2020-02-02 14:58:01 +00:00
HIS.GetToCl >STA.G HIS.Index
2019-07-31 15:10:59 +00:00
jsr CL.CLR
2020-02-02 14:58:01 +00:00
>PUSHB.G HIS.hBuf
>PUSHB.G HIS.Index
>PUSHW ZPCLBuf
>SYSCALL StrVGet
2020-02-02 15:56:46 +00:00
ldy #$ff
.1 iny
lda (ZPCLBuf),y
bne .1
tya
>STA.G CL.Ptr
2018-11-10 14:30:09 +00:00
>STA.G CL.Len
2019-01-26 21:46:39 +00:00
jmp CL.PrintCLBuf
2015-10-19 20:35:00 +00:00
*--------------------------------------
MAN
2020-05-26 14:23:09 +00:00
SAVE usr/src/bin/sh.s.his
LOAD usr/src/bin/sh.s
2015-10-19 20:35:00 +00:00
ASM