diff --git a/chtype.s b/chtype.s index 694a4d0..43c0ea0 100644 --- a/chtype.s +++ b/chtype.s @@ -2,72 +2,82 @@ ;;; .org $2000 -INBUF := $200 ;GETLN input buffer. -WAIT := $FCA8 ;Monitor wait routine. -BELL := $FF3A ;Monitor bell routine -EXTRNCMD := $BE06 ;External cmd JMP vector. -XTRNADDR := $BE50 ;Ext cmd implementation addr. -XLEN := $BE52 ;Length of command string-1. -XCNUM := $BE53 ;CI cmd no. (ext cmd = 0). -PBITS := $BE54 ;Command parameter bits. -VSLOT := $BE61 ;Verified slot parameter. +INBUF := $200 ;GETLN input buffer. + +WAIT := $FCA8 ;Monitor wait routine. +BELL := $FF3A ;Monitor bell routine + + +;;; BASIC.SYSTEM global page + +EXTRNCMD := $BE06 ;External cmd JMP vector. +XTRNADDR := $BE50 ;Ext cmd implementation addr. +XLEN := $BE52 ;Length of command string-1. +XCNUM := $BE53 ;CI cmd no. (ext cmd = 0). +PBITS := $BE54 ;Command parameter bits. +VSLOT := $BE61 ;Verified slot parameter. + +;;; TODO: Relocate into ProDOS-allocated buffer ;;; -;;; REMEMBER TO SAVE THE PREVIOUS COMMAND ADDRESS. +;;; Remember to save the previous command address. ;;; - LDA EXTRNCMD+1 - STA NXTCMD - LDA EXTRNCMD+2 - STA NXTCMD+1 + lda EXTRNCMD+1 + sta nxtcmd + lda EXTRNCMD+2 + sta nxtcmd+1 ;;; - LDA #>BEEPSLOT ;Install the address of our - STA EXTRNCMD+1 ; command handler in the - LDA #beepslot ;Install the address of our + sta EXTRNCMD+1 ; command handler in the + lda #EXECUTE ;Point XTRNADDR to our - STA XTRNADDR ; command execution - LDA #execute ;Point XTRNADDR to our + sta XTRNADDR ; command execution + lda #