2018-01-18 06:49:41 +00:00
|
|
|
|
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
|
2017-09-08 14:49:23 +00:00
|
|
|
|
>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
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>STA.G HIS.Index
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2017-09-08 14:49:23 +00:00
|
|
|
|
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
|
2017-09-26 06:27:34 +00:00
|
|
|
|
>DEC.G HIS.Count
|
2020-02-02 14:58:01 +00:00
|
|
|
|
bra HIS.Add
|
|
|
|
|
|
|
|
|
|
.1 >STZ.G HIS.Index Reset Index
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>INC.G HIS.Count
|
2020-02-07 12:53:46 +00:00
|
|
|
|
.9
|
|
|
|
|
History.RTS rts
|
2015-10-19 20:35:00 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-08 14:49:23 +00:00
|
|
|
|
HIS.GetPrev >LDA.G HIS.hBuf
|
2015-10-19 20:35:00 +00:00
|
|
|
|
beq HISTORY.RTS
|
2020-02-02 14:58:01 +00:00
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>LDA.G HIS.Count
|
|
|
|
|
beq HISTORY.RTS empty history,nothing to do
|
2020-02-02 14:58:01 +00:00
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>LDA.G HIS.Index
|
|
|
|
|
bne .1
|
2020-02-02 14:58:01 +00:00
|
|
|
|
|
2017-09-25 15:50:33 +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
|
|
|
|
*--------------------------------------
|
2017-09-08 14:49:23 +00:00
|
|
|
|
HIS.GetNext >LDA.G HIS.hBuf
|
2015-10-19 20:35:00 +00:00
|
|
|
|
beq HISTORY.RTS
|
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>LDA.G HIS.Count
|
|
|
|
|
beq HISTORY.RTS empty history,nothing to do
|
2020-02-02 14:58:01 +00:00
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
>LDA.G HIS.Index
|
|
|
|
|
inc
|
|
|
|
|
>CMP.G HIS.Count
|
2020-02-02 14:58:01 +00:00
|
|
|
|
bne HIS.GetToCl
|
|
|
|
|
|
2017-09-25 15:50:33 +00:00
|
|
|
|
lda #0
|
2017-09-26 15:55:25 +00:00
|
|
|
|
>STA.G HIS.Index
|
2017-11-08 16:09:52 +00:00
|
|
|
|
jmp CL.CLR
|
2017-09-26 15:55:25 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-02 14:58:01 +00:00
|
|
|
|
HIS.GetToCl >STA.G HIS.Index
|
2017-09-26 15:55:25 +00:00
|
|
|
|
|
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
|
2019-02-08 16:13:43 +00:00
|
|
|
|
SAVE USR/SRC/BIN/SH.S.HIS
|
|
|
|
|
LOAD USR/SRC/BIN/SH.S
|
2015-10-19 20:35:00 +00:00
|
|
|
|
ASM
|