Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TITLE 'FORTH800 FÖR ABC 800'
- ;****************************
- ;
- ; FORTH FOR ABC80
- ;
- ; BOB JOHNSEN
- ;
- ; 1982.06.06
- ;
- ; MODIFIED FOR ABC 800
- ;
- ; MATS KNUTS ABC-Klubben <746>
- ;
- ; 1982.09.30
- ;
- ;
- ;****************************
- FIGREL EQU 1
- FIGREV EQU 1
- USRVER EQU 6
- ;
- ; ASCII CHAR USED
- ;
- ABL EQU 20H ; SPACE
- ACR EQU 0DH ; CR
- ADOT EQU 02EH ; PERIOD
- BELL EQU 07H ; BELL
- BSIN EQU 08H ; INPUT BS
- BSOUT EQU 08H ; OUTPUT BS
- DLE EQU 10H ; CTRL-P
- LF EQU 0AH ; LF
- FF EQU 0CH ; FF
- ;
- ; MEMORY ALLOCATION
- ;
- ; IN THE FOLLOWING LIST OF EQUATES
- ; * WILL INDICATE VALUES THAT MUST BE ALTERED FOR 40 CHAR. SCREENS
- ; ** WILL INDICATE VALUES THAT MUST BE ALTERED FOR 16K MEMORY
- ; THE CURRENT VALUES ARE APPROPRIATE FOR 80 CHAR. SCREEN AND 32K
- ;
- EM EQU 0F500H ; TOP OF MEMORY +1 = LIMIT
- BPSCR EQU 1024 ; BYTES/SCREEN * (768)
- SPDRV2 EQU 612 ; SECTORS/DRIVE (DOUBLE DENS) * (615)
- SPDRV1 EQU 292 ; SECTORS/DRIVE (SINGLE DENS) * (294)
- CPLL EQU 64 ; C/L EDITING * (36)
- LPSCR EQU 16 ; LINES/SCREEN * (21)
- NSCR EQU 10 ; #SCREENS * (12) ** (2)
- KBBUF EQU BPSCR ; BYTES/BUFFER
- US EQU 40H ; USER VARIABLES SPACE
- RTS EQU 0A0H ; RETURN STACK AND TERM. BUFFER SPACE
- ;
- CO EQU KBBUF+4 ;DISK BUFFER +2 HEADER +2 TAIL
- NBUF EQU NSCR*BPSCR/KBBUF ; # BUFFERS
- BUF1 EQU EM-CO*NBUF ; ADDR FIRST DISC BUFFER
- INITR0 EQU BUF1-US ; (R0)
- INITS0 EQU INITR0-RTS ; (S0)
- ;
- NAMFLD EQU 0FE00H ; PRINTERFILNAMN I POKEAREAN
- KOL EQU 0FF52H ; 65012 I ABC 80
- RAD EQU 0FF53H ; 65011 I ABC 80
- TGBF EQU 0FFE2H ; 65013 I ABC 80 TANGENTBORDSFLAGGA
- ;
- ;----------------------------------------------------------------------
- ;
- ORG 8000H ; ** (0C000H)
- ORIG NOP
- JP CLD
- NOP
- JP WRM
- DEFB FIGREL
- DEFB FIGREV
- DEFB USRVER
- DEFB 0EH
- DEFW TASK-7
- DEFW BSIN
- DEFW INITR0
- ;
- ;<<<<< FOLLOWING USED BY COLD
- ; MUST BE IN SAME ORDER AS USER VARIABLES
- ;
- DEFW INITS0
- DEFW INITR0
- DEFW INITS0
- DEFW 1FH
- DEFW 1
- DEFW INITDP
- DEFW INITDP
- DEFW FORTH+8
- ;
- ;<<<<< END DATA USED BY COLD
- ;
- DEFW 0
- DEFW 0B250H
- UP DEFW INITR0
- RPP DEFW INITR0
- ;
- ;----------------------------------------------------------
- ;
- ; NEXT, THE FORTH ADDRESS INTERPRETER
- ; (POST INCREMENTING VERSION)
- ;
- DPUSH PUSH DE
- HPUSH PUSH HL
- NEXT LD A,(BC)
- INC BC
- LD L,A
- LD A,(BC)
- INC BC
- LD H,A
- NEXT1 LD E,(HL)
- INC HL
- LD D,(HL)
- EX DE,HL
- JP (HL)
- ;
- ; FORTH DICTIONARY
- ;
- DP0 DEFB 83H ; LIT
- DEFM 'LI'
- DEFB 'T'+80H
- DEFW 0 ; MARK END OF DICTIONARY
- LIT DEFW $+2
- LD A,(BC)
- INC BC
- LD L,A
- LD A,(BC)
- INC BC
- LD H,A
- JR HPUSH
- DEFB 87H ; EXECUTE
- DEFM 'EXECUT'
- DEFB 'E'+80H
- DEFW LIT-6
- EXEC DEFW $+2
- POP HL
- JR NEXT1
- DEFB 86H ; BRANCH
- DEFM 'BRANC'
- DEFB 'H'+80H
- DEFW EXEC-0AH
- BRAN DEFW $+2
- BRAN1 LD H,B
- LD L,C
- LD E,(HL)
- INC HL
- LD D,(HL)
- DEC HL
- ADD HL,DE
- LD C,L
- LD B,H
- JP NEXT
- ;
- DEFB 87H ; 0BRANCH
- DEFM '0BRANC'
- DEFB 'H'+80H
- DEFW BRAN-9
- ZBRAN DEFW $+2
- POP HL
- LD A,L
- OR H
- JR Z,BRAN1
- INC BC
- INC BC
- JP NEXT
- ;
- DEFB 86H ; (LOOP)
- DEFM '(LOOP'
- DEFB ')'+80H
- DEFW ZBRAN-0AH
- XLOOP DEFW $+2
- LD DE,1
- XLOO1 LD HL,(RPP)
- LD A,(HL)
- ADD A,E
- LD (HL),A
- LD E,A
- INC HL
- LD A,(HL)
- ADC A,D
- LD (HL),A
- INC HL
- INC D
- DEC D
- LD D,A
- JP M,XLOO2
- LD A,E
- SUB (HL)
- LD A,D
- INC HL
- SBC A,(HL)
- JR XLOO3
- XLOO2 LD A,(HL)
- SUB E
- INC HL
- LD A,(HL)
- SBC A,D
- ;
- XLOO3 JP M,BRAN1
- INC HL
- LD (RPP),HL
- INC BC
- INC BC
- JP NEXT
- ;
- DEFB 87H ; (+LOOP)
- DEFM '(+LOOP'
- DEFB ')'+80H
- DEFW XLOOP-9
- XPLOO DEFW $+2
- POP DE
- JR XLOO1
- ;
- DEFB 84H ; (DO)
- DEFM '(DO'
- DEFB ')'+80H
- DEFW XPLOO-0AH
- XDO DEFW $+2
- LD HL,(RPP)
- DEC HL
- DEC HL
- DEC HL
- DEC HL
- LD (RPP),HL
- POP DE
- LD (HL),E
- INC HL
- LD (HL),D
- POP DE
- INC HL
- LD (HL),E
- INC HL
- LD (HL),D
- JP NEXT
- ;
- DEFB 81H ; I
- DEFB 'I'+80H
- DEFW XDO-7
- IDO DEFW $+2
- LD HL,(RPP)
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- JP NEXT
- ;
- DEFB 85H ; DIGIT
- DEFM 'DIGI'
- DEFB 'T'+80H
- DEFW IDO-4
- DIGIT DEFW $+2
- POP HL
- POP DE
- LD A,E
- SUB 30H
- JP M,DIGI2
- CP 0AH
- JP M,DIGI1
- SUB 7
- CP 0AH
- JP M,DIGI2
- DIGI1 CP L
- JP P,DIGI2
- LD E,A
- LD HL,1
- JP DPUSH
- DIGI2 LD L,H
- JP HPUSH
- ;
- DEFB 86H ; (FIND)
- DEFM '(FIND'
- DEFB ')'+80H
- DEFW DIGIT-8
- PFIND DEFW $+2
- POP DE
- PFIN1 POP HL
- PUSH HL
- LD A,(DE)
- XOR (HL)
- AND 3FH
- JR NZ,PFIN4
- PFIN2 INC HL
- INC DE
- LD A,(DE)
- XOR (HL)
- ADD A,A
- JR NZ,PFIN3
- JR NC,PFIN2
- LD HL,5
- ADD HL,DE
- EX (SP),HL
- PFIN6 DEC DE
- LD A,(DE)
- OR A
- JP P,PFIN6
- LD E,A
- LD D,0
- LD HL,1
- JP DPUSH
- PFIN3 JR C,PFIN5
- PFIN4 INC DE
- LD A,(DE)
- OR A
- JP P,PFIN4
- PFIN5 INC DE
- EX DE,HL
- LD E,(HL)
- INC HL
- LD D,(HL)
- LD A,D
- OR E
- JP NZ,PFIN1
- POP HL
- LD HL,0
- JP HPUSH
- ;
- ;
- ; THIS VERSION OF ENCLOSE IS TAKEN FROM FORTH DIMENSIONS
- ; III/2 AND IS APPROPRIATE IF DISK BUFFERS ARE 256 BYTES OR MORE
- DEFB 87H ; ENCLOSE
- DEFM 'ENCLOS'
- DEFB 'E'+80H
- DEFW PFIND-9
- ENCL DEFW $+2
- POP DE
- POP HL
- PUSH HL
- LD A,E
- LD DE,-1
- DEC HL
- ENCL1 INC HL
- INC DE
- CP (HL)
- JR Z,ENCL1
- PUSH DE
- PUSH AF
- LD A,(HL)
- AND A
- JR NZ,ENCL2
- POP AF
- INC DE
- PUSH DE
- DEC DE
- PUSH DE
- JP NEXT
- ENCL2 POP AF
- INC HL
- INC DE
- CP (HL)
- JR Z,ENCL4
- PUSH AF
- LD A,(HL)
- AND A
- JR NZ,ENCL2
- POP AF
- PUSH DE
- PUSH DE
- JP NEXT
- ENCL4 PUSH DE
- INC DE
- PUSH DE
- JP NEXT
- ;
- DEFB 84H ; EMIT
- DEFM 'EMI'
- DEFB 'T'+80H
- DEFW ENCL-0AH
- EMIT DEFW DOCOL
- DEFW PEMIT
- DEFW ONE
- DEFW OUTT
- DEFW PSTOR
- DEFW SEMIS
- ;
- DEFB 83H ; KEY
- DEFM 'KE'
- DEFB 'Y'+80H
- DEFW EMIT-7
- KEY DEFW $+2
- JP PKEY
- ;
- DEFB 89H ; ?TERMINAL
- DEFM '?TERMINA'
- DEFB 'L'+80H
- DEFW KEY-6
- QTERM DEFW $+2
- LD HL,0
- JP PQTER
- ;
- DEFB 82H ; CR
- DEFB 'C'
- DEFB 'R'+80H
- DEFW QTERM-0CH
- CR DEFW $+2
- JP PCR
- ;
- DEFB 85H ; CMOVE
- DEFM 'CMOV'
- DEFB 'E'+80H
- DEFW CR-5
- CMOVE DEFW $+2
- LD (SAVEBC),BC
- POP BC ; # BYTES TO BE TRANSFERRED
- POP DE ; DESTINATION
- POP HL ; SOURCE
- LD A,B ; TEST IF ZERO FROM START
- OR C
- JR Z,CMOV1
- LDIR ; START TRANSFER
- CMOV1 LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 86H ; <CMOVE
- DEFM '<CMOV'
- DEFB 'E'+80H
- DEFW CMOVE-8
- MCMOVE DEFW $+2
- LD (SAVEBC),BC
- POP BC
- POP HL
- ADD HL,BC
- EX DE,HL
- POP HL
- ADD HL,BC
- LD A,B
- OR C
- JR Z,MCMOV1
- DEC DE
- DEC HL
- LDDR
- MCMOV1 LD BC,(SAVEBC)
- JP NEXT
- DEFB 82H ; U*
- DEFB 'U'
- DEFB '*'+80H
- DEFW MCMOVE-9
- USTAR DEFW $+2
- POP DE
- POP HL
- PUSH BC
- LD B,H
- LD A,L
- CALL MPYX
- PUSH HL
- LD H,A
- LD A,B
- LD B,H
- CALL MPYX
- POP DE
- LD C,D
- ADD HL,BC
- ADC A,0
- LD D,L
- LD L,H
- LD H,A
- POP BC
- PUSH DE
- JP HPUSH
- ;
- ; MULTIPLY PRIMITIVE
- ;
- MPYX LD HL,0
- LD C,8
- MPYX1 ADD HL,HL
- RLA
- JR NC,MPYX2
- ADD HL,DE
- ADC A,0
- MPYX2 DEC C
- JR NZ,MPYX1
- RET
- ;
- DEFB 82H ; U/
- DEFB 'U'
- DEFB '/'+80H
- DEFW USTAR-5
- USLAS DEFW $+2
- LD HL,4
- ADD HL,SP
- LD E,(HL)
- LD (HL),C
- INC HL
- LD D,(HL)
- LD (HL),B
- POP BC
- POP HL
- LD A,L
- SUB C
- LD A,H
- SBC A,B
- JR C,USLA1
- LD HL,0FFFFH
- LD DE,0FFFFH
- JR USLA7
- USLA1 LD A,16
- USLA2 ADD HL,HL
- RLA
- EX DE,HL
- ADD HL,HL
- JR NC,USLA3
- INC DE
- AND A
- USLA3 EX DE,HL
- RRA
- PUSH AF
- JR NC,USLA4
- LD A,L
- SUB C
- LD L,A
- LD A,H
- SBC A,B
- LD H,A
- JR USLA5
- USLA4 LD A,L
- SUB C
- LD L,A
- LD A,H
- SBC A,B
- LD H,A
- JR NC,USLA5
- ADD HL,BC
- DEC DE
- USLA5 INC DE
- USLA6 POP AF
- DEC A
- JR NZ,USLA2
- USLA7 POP BC
- PUSH HL
- PUSH DE
- JP NEXT
- ;
- DEFB 83H ; AND
- DEFM 'AN'
- DEFB 'D'+80H
- DEFW USLAS-5
- ANDD DEFW $+2
- POP DE
- POP HL
- LD A,E
- AND L
- LD L,A
- LD A,D
- AND H
- LD H,A
- JP HPUSH
- ;
- DEFB 82H ; OR
- DEFB 'O'
- DEFB 'R'+80H
- DEFW ANDD-6
- ORR DEFW $+2
- POP DE
- POP HL
- LD A,E
- OR L
- LD L,A
- LD A,D
- OR H
- LD H,A
- JP HPUSH
- ;
- DEFB 83H ; XOR
- DEFM 'XO'
- DEFB 'R'+80H
- DEFW ORR-5
- XORR DEFW $+2
- POP DE
- POP HL
- LD A,E
- XOR L
- LD L,A
- LD A,D
- XOR H
- LD H,A
- JP HPUSH
- ;
- DEFB 83H ; SP@
- DEFM 'SP'
- DEFB '@'+80H
- DEFW XORR-6
- SPAT DEFW $+2
- LD HL,0
- ADD HL,SP
- JP HPUSH
- ;
- DEFB 83H ; SP!
- DEFM 'SP'
- DEFB '!'+80H
- DEFW SPAT-6
- SPSTO DEFW $+2
- LD HL,(UP)
- LD DE,6
- ADD HL,DE
- LD E,(HL)
- INC HL
- LD D,(HL)
- EX DE,HL
- LD SP,HL
- JP NEXT
- ;
- DEFB 83H ; RP@
- DEFM 'RP'
- DEFB '@'+80H
- DEFW SPSTO-6
- RPAT DEFW $+2
- LD HL,(RPP)
- JP HPUSH
- ;
- DEFB 83H ; RP!
- DEFM 'RP'
- DEFB '!'+80H
- DEFW RPAT-6
- RPSTO DEFW $+2
- LD HL,(UP)
- LD DE,8
- ADD HL,DE
- LD E,(HL)
- INC HL
- LD D,(HL)
- EX DE,HL
- LD (RPP),HL
- JP NEXT
- ;
- DEFB 82H ; ;S
- DEFB ';'
- DEFB 'S'+80H
- DEFW RPSTO-6
- SEMIS DEFW $+2
- LD HL,(RPP)
- LD C,(HL)
- INC HL
- LD B,(HL)
- INC HL
- LD (RPP),HL
- JP NEXT
- ;
- DEFB 85H ; LEAVE
- DEFM 'LEAV'
- DEFB 'E'+80H
- DEFW SEMIS-5
- LEAVE DEFW $+2
- LD HL,(RPP)
- LD E,(HL)
- INC HL
- LD D,(HL)
- INC HL
- LD (HL),E
- INC HL
- LD (HL),D
- JP NEXT
- ;
- DEFB 82H ; >R
- DEFB '>'
- DEFB 'R'+80H
- DEFW LEAVE-8
- TOR DEFW $+2
- POP DE
- LD HL,(RPP)
- DEC HL
- DEC HL
- LD (RPP),HL
- LD (HL),E
- INC HL
- LD (HL),D
- JP NEXT
- ;
- DEFB 82H ; R>
- DEFB 'R'
- DEFB '>'+80H
- DEFW TOR-5
- FROMR DEFW $+2
- LD HL,(RPP)
- LD E,(HL)
- INC HL
- LD D,(HL)
- INC HL
- LD (RPP),HL
- PUSH DE
- JP NEXT
- ;
- DEFB 81H ; R
- DEFB 'R'+80H
- DEFW FROMR-5
- RR1 DEFW IDO+2
- ;
- DEFB 82H ; 0=
- DEFB '0'
- DEFB '='+80H
- DEFW RR1-4
- ZEQU DEFW $+2
- POP HL
- LD A,L
- OR H
- LD HL,0
- JR NZ,ZEQU1
- INC HL
- ZEQU1 JP HPUSH
- ;
- DEFB 82H ; 0<
- DEFB '0'
- DEFB '<'+80H
- DEFW ZEQU-5
- ZLESS DEFW $+2
- POP HL
- ADD HL,HL
- LD HL,0
- JR NC,ZLES1
- INC HL
- ZLES1 JP HPUSH
- ;
- DEFB 81H ; +
- DEFB '+'+80H
- DEFW ZLESS-5
- PLUS DEFW $+2
- POP DE
- POP HL
- ADD HL,DE
- JP HPUSH
- ;
- DEFB 82H ; D+
- DEFB 'D'
- DEFB '+'+80H
- DEFW PLUS-4
- DPLUS DEFW $+2
- LD HL,6
- ADD HL,SP
- LD E,(HL)
- LD (HL),C
- INC HL
- LD D,(HL)
- LD (HL),B
- POP BC
- POP HL
- ADD HL,DE
- EX DE,HL
- POP HL
- LD A,L
- ADC A,C
- LD L,A
- LD A,H
- ADC A,B
- LD H,A
- POP BC
- PUSH DE
- JP HPUSH
- ;
- DEFB 85H ; MINUS
- DEFM 'MINU'
- DEFB 'S'+80H
- DEFW DPLUS-5
- MINUS DEFW $+2
- POP HL
- LD A,L
- CPL
- LD L,A
- LD A,H
- CPL
- LD H,A
- INC HL
- JP HPUSH
- ;
- DEFB 86H ; DMINUS
- DEFM 'DMINU'
- DEFB 'S'+80H
- DEFW MINUS-8
- DMINU DEFW $+2
- POP HL
- POP DE
- SUB A
- SUB E
- LD E,A
- LD A,0
- SBC A,D
- LD D,A
- LD A,0
- SBC A,L
- LD L,A
- LD A,0
- SBC A,H
- LD H,A
- PUSH DE
- JP HPUSH
- ;
- DEFB 84H ; OVER
- DEFM 'OVE'
- DEFB 'R'+80H
- DEFW DMINU-9
- OVER DEFW $+2
- POP DE
- POP HL
- PUSH HL
- JP DPUSH
- ;
- DEFB 84H ; DROP
- DEFM 'DRO'
- DEFB 'P'+80H
- DEFW OVER-7
- DROP DEFW $+2
- POP HL
- JP NEXT
- ;
- DEFB 84H ; SWAP
- DEFM 'SWA'
- DEFB 'P'+80H
- DEFW DROP-7
- SWAP DEFW $+2
- POP HL
- EX (SP),HL
- JP HPUSH
- ;
- DEFB 83H ; DUP
- DEFM 'DU'
- DEFB 'P'+80H
- DEFW SWAP-7
- DUP DEFW $+2
- POP HL
- PUSH HL
- JP HPUSH
- ;
- DEFB 84H ; 2DUP
- DEFM '2DU'
- DEFB 'P'+80H
- DEFW DUP-6
- TDUP DEFW $+2
- POP HL
- POP DE
- PUSH DE
- PUSH HL
- JP DPUSH
- ;
- DEFB 82H ; PLUS STORE
- DEFB '+'
- DEFB '!'+80H
- DEFW TDUP-7
- PSTOR DEFW $+2
- POP HL
- POP DE
- LD A,(HL)
- ADD A,E
- LD (HL),A
- INC HL
- LD A,(HL)
- ADC A,D
- LD (HL),A
- JP NEXT
- ;
- DEFB 86H ; TOGGLE
- DEFM 'TOGGL'
- DEFB 'E'+80H
- DEFW PSTOR-5
- TOGGL DEFW $+2
- POP DE
- POP HL
- LD A,(HL)
- XOR E
- LD (HL),A
- JP NEXT
- ;
- DEFB 81H ; @
- DEFB '@'+80H
- DEFW TOGGL-9
- AT DEFW $+2
- POP HL
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- JP NEXT
- ;
- DEFB 82H ; C@
- DEFB 'C'
- DEFB '@'+80H
- DEFW AT-4
- CAT DEFW $+2
- POP HL
- LD L,(HL)
- LD H,0
- JP HPUSH
- ;
- DEFB 82H ; 2@
- DEFB '2'
- DEFB '@'+80H
- DEFW CAT-5
- TAT DEFW $+2
- POP HL
- LD DE,2
- ADD HL,DE
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- LD DE,-3
- ADD HL,DE
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- JP NEXT
- DEFB 81H ; STORE
- DEFB '!'+80H
- DEFW TAT-5
- STORE DEFW $+2
- POP HL
- POP DE
- LD (HL),E
- INC HL
- LD (HL),D
- JP NEXT
- ;
- DEFB 82H ; C STORE
- DEFB 'C'
- DEFB '!'+80H
- DEFW STORE-4
- CSTOR DEFW $+2
- POP HL
- POP DE
- LD (HL),E
- JP NEXT
- ;
- DEFB 82H ; 2 STORE
- DEFB '2'
- DEFB '!'+80H
- DEFW CSTOR-5
- TSTOR DEFW $+2
- POP HL
- POP DE
- LD (HL),E
- INC HL
- LD (HL),D
- INC HL
- POP DE
- LD (HL),E
- INC HL
- LD (HL),D
- JP NEXT
- ;
- DEFB 0C1H ; :
- DEFB ':'+80H
- DEFW TSTOR-5
- COLON DEFW DOCOL
- DEFW QEXEC
- DEFW SCSP
- DEFW CURR
- DEFW AT
- DEFW CONT
- DEFW STORE
- DEFW CREAT
- DEFW RBRAC
- DEFW PSCOD
- DOCOL LD HL,(RPP)
- DEC HL
- LD (HL),B
- DEC HL
- LD (HL),C
- LD (RPP),HL
- INC DE
- LD C,E
- LD B,D
- JP NEXT
- ;
- DEFB 0C1H ; ;
- DEFB ';'+80H
- DEFW COLON-4
- SEMI DEFW DOCOL
- DEFW QCSP
- DEFW COMP
- DEFW SEMIS
- DEFW SMUDG
- DEFW LBRAC
- DEFW SEMIS
- ;
- DEFB 84H ; NOOP
- DEFM 'NOO'
- DEFB 'P'+80H
- DEFW SEMI-4
- NOOP DEFW DOCOL
- DEFW SEMIS
- ;
- DEFB 88H ; CONSTANT
- DEFM 'CONSTAN'
- DEFB 'T'+80H
- DEFW NOOP-7
- CON DEFW DOCOL
- DEFW CREAT
- DEFW SMUDG
- DEFW COMMA
- DEFW PSCOD
- DOCON INC DE
- EX DE,HL
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- JP NEXT
- ;
- DEFB 88H ; VARIABLE
- DEFM 'VARIABL'
- DEFB 'E'+80H
- DEFW CON-0BH
- VAR DEFW DOCOL
- DEFW CON
- DEFW PSCOD
- DOVAR INC DE
- PUSH DE
- JP NEXT
- ;
- DEFB 84H ; USER
- DEFM 'USE'
- DEFB 'R'+80H
- DEFW VAR-0BH
- USER DEFW DOCOL
- DEFW CON
- DEFW PSCOD
- DOUSE INC DE
- EX DE,HL
- LD E,(HL)
- LD D,0
- LD HL,(UP)
- ADD HL,DE
- JP HPUSH
- ;
- DEFB 81H ; 0
- DEFB '0'+80H
- DEFW USER-7
- ZERO DEFW DOCON
- DEFW 0
- ;
- DEFB 81H ; 1
- DEFB '1'+80H
- DEFW ZERO-4
- ONE DEFW DOCON
- DEFW 1
- ;
- DEFB 81H ; 2
- DEFB '2'+80H
- DEFW ONE-4
- TWO DEFW DOCON
- DEFW 2
- ;
- DEFB 81H ; 3
- DEFB '3'+80H
- DEFW TWO-4
- THREE DEFW DOCON
- DEFW 3
- ;
- DEFB 82H ; BL
- DEFB 'B'
- DEFB 'L'+80H
- DEFW THREE-4
- BL DEFW DOCON
- DEFW 20H
- ;
- DEFB 83H ; C/L
- DEFM 'C/'
- DEFB 'L'+80H
- DEFW BL-5
- CSLL DEFW DOCON
- DEFW CPLL ; 35 CHAR/LINE ON ABC80
- ;
- DEFB 85H ; FIRST
- DEFM 'FIRS'
- DEFB 'T'+80H
- DEFW CSLL-6
- FIRST DEFW DOCON
- DEFW BUF1
- ;
- DEFB 85H ; LIMIT
- DEFM 'LIMI'
- DEFB 'T'+80H
- DEFW FIRST-8
- LIMIT DEFW DOCON
- DEFW EM
- ;
- DEFB 85H ; B/BUF
- DEFM 'B/BU'
- DEFB 'F'+80H
- DEFW LIMIT-8
- BBUF DEFW DOCON
- DEFW KBBUF
- ;
- DEFB 85H ; B/SCR
- DEFM 'B/SC'
- DEFB 'R'+80H
- DEFW BBUF-8
- BSCR DEFW DOCON
- DEFW BPSCR/KBBUF
- ;
- DEFB 87H ; +ORIGIN
- DEFM '+ORIGI'
- DEFB 'N'+80H
- DEFW BSCR-8
- PORIG DEFW DOCOL
- DEFW LIT
- DEFW ORIG
- DEFW PLUS
- DEFW SEMIS
- ;
- ; USER VARIABLES
- ;
- DEFB 82H ; S0
- DEFB 'S'
- DEFB '0'+80H
- DEFW PORIG-0AH
- SZERO DEFW DOUSE
- DEFW 6
- ;
- DEFB 82H ; R0
- DEFB 'R'
- DEFB '0'+80H
- DEFW SZERO-5
- RZERO DEFW DOUSE
- DEFW 8
- ;
- DEFB 83H ; TIB
- DEFM 'TI'
- DEFB 'B'+80H
- DEFW RZERO-5
- TIB DEFW DOUSE
- DEFB 0AH
- ;
- DEFB 85H ; WIDTH
- DEFM 'WIDT'
- DEFB 'H'+80H
- DEFW TIB-6
- WIDTH DEFW DOUSE
- DEFB 0CH
- ;
- DEFB 87H ; WARNING
- DEFM 'WARNIN'
- DEFB 'G'+80H
- DEFW WIDTH-8
- WARN DEFW DOUSE
- DEFB 0EH
- ;
- DEFB 85H ; FENCE
- DEFM 'FENC'
- DEFB 'E'+80H
- DEFW WARN-0AH
- FENCE DEFW DOUSE
- DEFB 10H
- ;
- DEFB 82H ; DP
- DEFB 'D'
- DEFB 'P'+80H
- DEFW FENCE-8
- DP DEFW DOUSE
- DEFB 12H
- ;
- DEFB 88H ; VOC-LINK
- DEFM 'VOC-LIN'
- DEFB 'K'+80H
- DEFW DP-5
- VOCL DEFW DOUSE
- DEFW 14H
- ;
- DEFB 83H ; BLK
- DEFM 'BL'
- DEFB 'K'+80H
- DEFW VOCL-0BH
- BLK DEFW DOUSE
- DEFB 16H
- ;
- DEFB 82H ; IN
- DEFB 'I'
- DEFB 'N'+80H
- DEFW BLK-6
- INN DEFW DOUSE
- DEFB 18H
- ;
- DEFB 83H ; OUT
- DEFM 'OU'
- DEFB 'T'+80H
- DEFW INN-5
- OUTT DEFW DOUSE
- DEFB 1AH
- ;
- DEFB 83H ; SCR
- DEFM 'SC'
- DEFB 'R'+80H
- DEFW OUTT-6
- SCR DEFW DOUSE
- DEFB 1CH
- ;
- DEFB 86H ; OFFSET
- DEFM 'OFFSE'
- DEFB 'T'+80H
- DEFW SCR-6
- OFSET DEFW DOUSE
- DEFB 1EH
- ;
- DEFB 87H ; CONTEXT
- DEFM 'CONTEX'
- DEFB 'T'+80H
- DEFW OFSET-9
- CONT DEFW DOUSE
- DEFB 20H
- ;
- DEFB 87H ; CURRENT
- DEFM 'CURREN'
- DEFB 'T'+80H
- DEFW CONT-0AH
- CURR DEFW DOUSE
- DEFB 22H
- ;
- DEFB 85H ; STATE
- DEFM 'STAT'
- DEFB 'E'+80H
- DEFW CURR-0AH
- STATE DEFW DOUSE
- DEFB 24H
- ;
- DEFB 84H ; BASE
- DEFM 'BAS'
- DEFB 'E'+80H
- DEFW STATE-8
- BASE DEFW DOUSE
- DEFB 26H
- ;
- DEFB 83H ; DPL
- DEFM 'DP'
- DEFB 'L'+80H
- DEFW BASE-7
- DPL DEFW DOUSE
- DEFB 28H
- ;
- DEFB 83H ; FLD
- DEFM 'FL'
- DEFB 'D'+80H
- DEFW DPL-6
- FLD DEFW DOUSE
- DEFB 2AH
- ;
- DEFB 83H ; CSP
- DEFM 'CS'
- DEFB 'P'+80H
- DEFW FLD-6
- CSPP DEFW DOUSE
- DEFB 2CH
- ;
- DEFB 82H ; R#
- DEFB 'R'
- DEFB '#'+80H
- DEFW CSPP-6
- RNUM DEFW DOUSE
- DEFB 2EH
- ;
- DEFB 83H ; HLD
- DEFM 'HL'
- DEFB 'D'+80H
- DEFW RNUM-5
- HLD DEFW DOUSE
- DEFW 30H
- ;
- ; END OF USER VARIABLES
- ;
- DEFB 82H ; 1+
- DEFB '1'
- DEFB '+'+80H
- DEFW HLD-6
- ONEP DEFW DOCOL
- DEFW ONE
- DEFW PLUS
- DEFW SEMIS
- ;
- DEFB 82H ; 2+
- DEFB '2'
- DEFB '+'+80H
- DEFW ONEP-5
- TWOP DEFW DOCOL
- DEFW TWO
- DEFW PLUS
- DEFW SEMIS
- ;
- DEFB 84H ; HERE
- DEFM 'HER'
- DEFB 'E'+80H
- DEFW TWOP-5
- HERE DEFW DOCOL
- DEFW DP
- DEFW AT
- DEFW SEMIS
- ;
- DEFB 85H ; ALLOT
- DEFM 'ALLO'
- DEFB 'T'+80H
- DEFW HERE-7
- ALLOT DEFW DOCOL
- DEFW DP
- DEFW PSTOR
- DEFW SEMIS
- ;
- DEFB 81H ; ,
- DEFB ','+80H
- DEFW ALLOT-8
- COMMA DEFW DOCOL
- DEFW HERE
- DEFW STORE
- DEFW TWO
- DEFW ALLOT
- DEFW SEMIS
- ;
- DEFB 82H ; C,
- DEFB 'C'
- DEFB ','+80H
- DEFW COMMA-4
- CCOMM DEFW DOCOL
- DEFW HERE
- DEFW CSTOR
- DEFW ONE
- DEFW ALLOT
- DEFW SEMIS
- ;
- ; SUBROUTINE USED BY - AND <
- ;
- SSUB LD A,L
- SUB E
- LD L,A
- LD A,H
- SBC A,D
- LD H,A
- RET
- ;
- DEFB 81H ; -
- DEFB '-'+80H
- DEFW CCOMM-5
- SUBB DEFW $+2
- POP DE
- POP HL
- CALL SSUB
- JP HPUSH
- ;
- DEFB 81H ; =
- DEFB '='+80H
- DEFW SUBB-4
- EQUAL DEFW DOCOL
- DEFW SUBB
- DEFW ZEQU
- DEFW SEMIS
- ;
- DEFB 81H ; <
- DEFB '<'+80H
- DEFW EQUAL-4
- LESS DEFW $+2
- POP DE
- POP HL
- LD A,D
- XOR H
- JP M,LES1
- CALL SSUB
- LES1 INC H
- DEC H
- JP M,LES2
- LD HL,0
- JP HPUSH
- LES2 LD HL,1
- JP HPUSH
- ;
- DEFB 82H ; U<
- DEFB 'U'
- DEFB '<'+80H
- DEFW LESS-4
- ULESS DEFW DOCOL
- DEFW TDUP
- DEFW XORR
- DEFW ZLESS
- DEFW ZBRAN
- DEFW ULES1-$
- DEFW DROP
- DEFW ZLESS
- DEFW ZEQU
- DEFW BRAN
- DEFW ULES2-$
- ULES1 DEFW SUBB
- DEFW ZLESS
- ULES2 DEFW SEMIS
- ;
- DEFB 81H ; >
- DEFB '>'+80H
- DEFW ULESS-5
- GREAT DEFW DOCOL
- DEFW SWAP
- DEFW LESS
- DEFW SEMIS
- ;
- DEFB 83H ; ROT
- DEFM 'RO'
- DEFB 'T'+80H
- DEFW GREAT-4
- ROT DEFW $+2
- POP DE
- POP HL
- EX (SP),HL
- JP DPUSH
- ;
- DEFB 85H ; SPACE
- DEFM 'SPAC'
- DEFB 'E'+80H
- DEFW ROT-6
- SPACE DEFW DOCOL
- DEFW BL
- DEFW EMIT
- DEFW SEMIS
- ;
- DEFB 84H ; -DUP
- DEFM '-DU'
- DEFB 'P'+80H
- DEFW SPACE-8
- DDUP DEFW DOCOL
- DEFW DUP
- DEFW ZBRAN
- DEFW DDUP1-$
- DEFW DUP
- DDUP1 DEFW SEMIS
- ;
- DEFB 88H ; TRAVERSE
- DEFM 'TRAVERS'
- DEFB 'E'+80H
- DEFW DDUP-7
- TRAV DEFW DOCOL
- DEFW SWAP
- TRAV1 DEFW OVER
- DEFW PLUS
- DEFW LIT
- DEFW 7FH
- DEFW OVER
- DEFW CAT
- DEFW LESS
- DEFW ZBRAN
- DEFW TRAV1-$
- DEFW SWAP
- DEFW DROP
- DEFW SEMIS
- ;
- DEFB 86H ; LATEST
- DEFM 'LATES'
- DEFB 'T'+80H
- DEFW TRAV-0BH
- LATES DEFW DOCOL
- DEFW CURR
- DEFW AT
- DEFW AT
- DEFW SEMIS
- ;
- DEFB 83H ; LFA
- DEFM 'LF'
- DEFB 'A'+80H
- DEFW LATES-9
- LFA DEFW DOCOL
- DEFW LIT
- DEFW 4
- DEFW SUBB
- DEFW SEMIS
- ;
- DEFB 83H ; CFA
- DEFM 'CF'
- DEFB 'A'+80H
- DEFW LFA-6
- CFA DEFW DOCOL
- DEFW TWO
- DEFW SUBB
- DEFW SEMIS
- ;
- DEFB 83H ; NFA
- DEFM 'NF'
- DEFB 'A'+80H
- DEFW CFA-6
- NFA DEFW DOCOL
- DEFW LIT
- DEFW 5
- DEFW SUBB
- DEFW LIT
- DEFW -1
- DEFW TRAV
- DEFW SEMIS
- ;
- DEFB 83H ; PFA
- DEFM 'PF'
- DEFB 'A'+80H
- DEFW NFA-6
- PFA DEFW DOCOL
- DEFW ONE
- DEFW TRAV
- DEFW LIT
- DEFW 5
- DEFW PLUS
- DEFW SEMIS
- ;
- DEFB 84H ; STORE CSP
- DEFM '!CS'
- DEFB 'P'+80H
- DEFW PFA-6
- SCSP DEFW DOCOL
- DEFW SPAT
- DEFW CSPP
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 86H ; ?ERROR
- DEFM '?ERRO'
- DEFB 'R'+80H
- DEFW SCSP-7
- QERR DEFW DOCOL
- DEFW SWAP
- DEFW ZBRAN
- DEFW QERR1-$
- DEFW ERROR
- DEFW BRAN
- DEFW QERR2-$
- QERR1 DEFW DROP
- QERR2 DEFW SEMIS
- ;
- DEFB 85H ; ?COMP
- DEFM '?COM'
- DEFB 'P'+80H
- DEFW QERR-9
- QCOMP DEFW DOCOL
- DEFW STATE
- DEFW AT
- DEFW ZEQU
- DEFW LIT
- DEFW LPSCR+1
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 85H ; ?EXEC
- DEFM '?EXE'
- DEFB 'C'+80H
- DEFW QCOMP-8
- QEXEC DEFW DOCOL
- DEFW STATE
- DEFW AT
- DEFW LIT
- DEFW LPSCR+2
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 86H ; ?PAIRS
- DEFM '?PAIR'
- DEFB 'S'+80H
- DEFW QEXEC-8
- QPAIR DEFW DOCOL
- DEFW SUBB
- DEFW LIT
- DEFW LPSCR+3
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 84H ; ?CSP
- DEFM '?CS'
- DEFB 'P'+80H
- DEFW QPAIR-9
- QCSP DEFW DOCOL
- DEFW SPAT
- DEFW CSPP
- DEFW AT
- DEFW SUBB
- DEFW LIT
- DEFW LPSCR+4
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 88H ; ?LOADING
- DEFM '?LOADIN'
- DEFB 'G'+80H
- DEFW QCSP-7
- QLOAD DEFW DOCOL
- DEFW BLK
- DEFW AT
- DEFW ZEQU
- DEFW LIT
- DEFW LPSCR+6
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 87H ; COMPILE
- DEFM 'COMPIL'
- DEFB 'E'+80H
- DEFW QLOAD-0BH
- COMP DEFW DOCOL
- DEFW QCOMP
- DEFW FROMR
- DEFW DUP
- DEFW TWOP
- DEFW TOR
- DEFW AT
- DEFW COMMA
- DEFW SEMIS
- ;
- DEFB 0C1H ; [
- DEFB '['+80H
- DEFW COMP-0AH
- LBRAC DEFW DOCOL
- DEFW ZERO
- DEFW STATE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 81H ; ]
- DEFB ']'+80H
- DEFW LBRAC-4
- RBRAC DEFW DOCOL
- DEFW LIT
- DEFW 0C0H
- DEFW STATE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 86H ; SMUDGE
- DEFM 'SMUDG'
- DEFB 'E'+80H
- DEFW RBRAC-4
- SMUDG DEFW DOCOL
- DEFW LATES
- DEFW LIT
- DEFW 20H
- DEFW TOGGL
- DEFW SEMIS
- ;
- DEFB 83H ; HEX
- DEFM 'HE'
- DEFB 'X'+80H
- DEFW SMUDG-9
- HEX DEFW DOCOL
- DEFW LIT
- DEFW 10H
- DEFW BASE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 87H ; DECIMAL
- DEFM 'DECIMA'
- DEFB 'L'+80H
- DEFW HEX-6
- DECI DEFW DOCOL
- DEFW LIT
- DEFW 0AH
- DEFW BASE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 87H ; (;CODE)
- DEFM '(;CODE'
- DEFB ')'+80H
- DEFW DECI-0AH
- PSCOD DEFW DOCOL
- DEFW FROMR
- DEFW LATES
- DEFW PFA
- DEFW CFA
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C5H ; ;CODE
- DEFM ';COD'
- DEFB 'E'+80H
- DEFW PSCOD-0AH
- SEMIC DEFW DOCOL
- DEFW QCSP
- DEFW COMP
- DEFW PSCOD
- DEFW LBRAC
- SEMI1 DEFW NOOP ; (ASSEMBLER)
- DEFW SEMIS
- ;
- DEFB 87H ; <BUILDS
- DEFM '<BUILD'
- DEFB 'S'+80H
- DEFW SEMIC-8
- BUILD DEFW DOCOL
- DEFW ZERO
- DEFW CON
- DEFW SEMIS
- ;
- DEFB 85H ; DOES>
- DEFM 'DOES'
- DEFB '>'+80H
- DEFW BUILD-0AH
- DOES DEFW DOCOL
- DEFW FROMR
- DEFW LATES
- DEFW PFA
- DEFW STORE
- DEFW PSCOD
- DODOE LD HL,(RPP)
- DEC HL
- LD (HL),B
- DEC HL
- LD (HL),C
- LD (RPP),HL
- INC DE
- EX DE,HL
- LD C,(HL)
- INC HL
- LD B,(HL)
- INC HL
- JP HPUSH
- ;
- DEFB 85H ; COUNT
- DEFM 'COUN'
- DEFB 'T'+80H
- DEFW DOES-8
- COUNT DEFW DOCOL
- DEFW DUP
- DEFW ONEP
- DEFW SWAP
- DEFW CAT
- DEFW SEMIS
- ;
- DEFB 84H ; TYPE
- DEFM 'TYP'
- DEFB 'E'+80H
- DEFW COUNT-8
- TYPE DEFW DOCOL
- DEFW DDUP
- DEFW ZBRAN
- DEFW TYPE1-$
- DEFW OVER
- DEFW PLUS
- DEFW SWAP
- DEFW XDO
- TYPE2 DEFW IDO
- DEFW CAT
- DEFW LIT
- DEFW 127
- DEFW ANDD
- DEFW EMIT
- DEFW XLOOP
- DEFW TYPE2-$
- DEFW BRAN
- DEFW TYPE3-$
- TYPE1 DEFW DROP
- TYPE3 DEFW SEMIS
- ;
- DEFB 89H ; -TRAILING
- DEFM '-TRAILIN'
- DEFB 'G'+80H
- DEFW TYPE-7
- DTRAI DEFW DOCOL
- DEFW DUP
- DEFW ZERO
- DEFW XDO
- DTRA1 DEFW OVER
- DEFW OVER
- DEFW PLUS
- DEFW ONE
- DEFW SUBB
- DEFW CAT
- DEFW BL
- DEFW SUBB
- DEFW ZBRAN
- DEFW DTRA2-$
- DEFW LEAVE
- DEFW BRAN
- DEFW DTRA3-$
- DTRA2 DEFW ONE
- DEFW SUBB
- DTRA3 DEFW XLOOP
- DEFW DTRA1-$
- DEFW SEMIS
- ;
- DEFB 84H ; (.")
- DEFM '(."'
- DEFB ')'+80H
- DEFW DTRAI-0CH
- PDOTQ DEFW DOCOL
- DEFW RR1
- DEFW COUNT
- DEFW DUP
- DEFW ONEP
- DEFW FROMR
- DEFW PLUS
- DEFW TOR
- DEFW TYPE
- DEFW SEMIS
- ;
- DEFB 0C2H ; ."
- DEFB '.'
- DEFB '"'+80H
- DEFW PDOTQ-7
- DOTQ DEFW DOCOL
- DEFW LIT
- DEFW 22H
- DEFW STATE
- DEFW AT
- DEFW ZBRAN
- DEFW DOTQ1-$
- DEFW COMP
- DEFW PDOTQ
- DEFW WORD
- DEFW HERE
- DEFW CAT
- DEFW ONEP
- DEFW ALLOT
- DEFW BRAN
- DEFW DOTQ2-$
- DOTQ1 DEFW WORD
- DEFW HERE
- DEFW COUNT
- DEFW TYPE
- DOTQ2 DEFW SEMIS
- ;
- ; EXPECT ESPECIALLY FOR ABC80
- ;
- DEFB 86H ; EXPECT
- DEFM 'EXPEC'
- DEFB 'T'+80H
- DEFW DOTQ-5
- EXPEC DEFW $+2
- LD (SAVEBC),BC
- POP BC
- POP HL
- PUSH HL
- CALL 0005
- LD A,0DH
- POP HL
- DEC HL
- EXPE1 INC HL
- CP (HL)
- JR NZ,EXPE1
- LD (HL),0
- INC HL
- LD (HL),0
- INC HL
- LD (HL),0
- LD BC,20H ; BLANK
- CALL COUT
- LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 85H ; QUERY
- DEFM 'QUER'
- DEFB 'Y'+80H
- DEFW EXPEC-9
- QUERY DEFW DOCOL
- DEFW TIB
- DEFW AT
- DEFW LIT
- DEFW 50H
- DEFW EXPEC
- DEFW ZERO
- DEFW INN
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C1H ; 0 (NULL)
- DEFB 80H
- DEFW QUERY-8
- NULL DEFW DOCOL
- DEFW BLK
- DEFW AT
- DEFW ZBRAN
- DEFW NULL1-$
- DEFW ONE
- DEFW BLK
- DEFW PSTOR
- DEFW ZERO
- DEFW INN
- DEFW STORE
- DEFW BLK
- DEFW AT
- DEFW BSCR
- DEFW ONE
- DEFW SUBB
- DEFW ANDD
- DEFW ZEQU
- DEFW ZBRAN
- DEFW NULL2-$
- DEFW QEXEC
- DEFW FROMR
- DEFW DROP
- NULL2 DEFW BRAN
- DEFW NULL3-$
- NULL1 DEFW FROMR
- DEFW DROP
- NULL3 DEFW SEMIS
- ;
- DEFB 84H ; FILL
- DEFM 'FIL'
- DEFB 'L'+80H
- DEFW NULL-4
- FILL DEFW $+2
- LD (SAVEBC),BC
- POP BC ; C=CHAR
- POP DE ; COUNTER
- POP HL ; ADDRESS
- FILL1 LD A,D
- OR E
- JR Z,FILL2
- LD (HL),C
- DEC DE
- INC HL
- JR FILL1
- FILL2 LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 85H ; ERASE
- DEFM 'ERAS'
- DEFB 'E'+80H
- DEFW FILL-7
- ERASEE DEFW DOCOL
- DEFW ZERO
- DEFW FILL
- DEFW SEMIS
- ;
- DEFB 86H ; BLANKS
- DEFM 'BLANK'
- DEFB 'S'+80H
- DEFW ERASEE-8
- BLANK DEFW DOCOL
- DEFW BL
- DEFW FILL
- DEFW SEMIS
- ;
- DEFB 84H ; HOLD
- DEFM 'HOL'
- DEFB 'D'+80H
- DEFW BLANK-9
- HOLD DEFW DOCOL
- DEFW LIT
- DEFW -1
- DEFW HLD
- DEFW PSTOR
- DEFW HLD
- DEFW AT
- DEFW CSTOR
- DEFW SEMIS
- ;
- DEFB 83H ; PAD
- DEFM 'PA'
- DEFB 'D'+80H
- DEFW HOLD-7
- PAD DEFW DOCOL
- DEFW HERE
- DEFW LIT
- DEFW 44H
- DEFW PLUS
- DEFW SEMIS
- ;
- DEFB 84H ; WORD
- DEFM 'WOR'
- DEFB 'D'+80H
- DEFW PAD-6
- WORD DEFW DOCOL
- DEFW BLK
- DEFW AT
- DEFW ZBRAN
- DEFW WORD1-$
- DEFW BLK
- DEFW AT
- DEFW BLOCK
- DEFW BRAN
- DEFW WORD2-$
- WORD1 DEFW TIB
- DEFW AT
- WORD2 DEFW INN
- DEFW AT
- DEFW PLUS
- DEFW SWAP
- DEFW ENCL
- DEFW HERE
- DEFW LIT
- DEFW 22H
- DEFW BLANK
- DEFW INN
- DEFW PSTOR
- DEFW OVER
- DEFW SUBB
- DEFW TOR
- DEFW RR1
- DEFW HERE
- DEFW CSTOR
- DEFW PLUS
- DEFW HERE
- DEFW ONEP
- DEFW FROMR
- DEFW CMOVE
- DEFW SEMIS
- ;
- DEFB 88H ; (NUMBER)
- DEFM '(NUMBER'
- DEFB ')'+80H
- DEFW WORD-7
- PNUMB DEFW DOCOL
- PNUM1 DEFW ONEP
- DEFW DUP
- DEFW TOR
- DEFW CAT
- DEFW BASE
- DEFW AT
- DEFW DIGIT
- DEFW ZBRAN
- DEFW PNUM2-$
- DEFW SWAP
- DEFW BASE
- DEFW AT
- DEFW USTAR
- DEFW DROP
- DEFW ROT
- DEFW BASE
- DEFW AT
- DEFW USTAR
- DEFW DPLUS
- DEFW DPL
- DEFW AT
- DEFW ONEP
- DEFW ZBRAN
- DEFW PNUM3-$
- DEFW ONE
- DEFW DPL
- DEFW PSTOR
- PNUM3 DEFW FROMR
- DEFW BRAN
- DEFW PNUM1-$
- PNUM2 DEFW FROMR
- DEFW SEMIS
- ;
- DEFB 86H ; NUMBER
- DEFM 'NUMBE'
- DEFB 'R'+80H
- DEFW PNUMB-0BH
- NUMB DEFW DOCOL
- DEFW ZERO
- DEFW ZERO
- DEFW ROT
- DEFW DUP
- DEFW ONEP
- DEFW CAT
- DEFW LIT
- DEFW 2DH
- DEFW EQUAL
- DEFW DUP
- DEFW TOR
- DEFW PLUS
- DEFW LIT
- DEFW -1
- NUMB1 DEFW DPL
- DEFW STORE
- DEFW PNUMB
- DEFW DUP
- DEFW CAT
- DEFW BL
- DEFW SUBB
- DEFW ZBRAN
- DEFW NUMB2-$
- DEFW DUP
- DEFW CAT
- DEFW LIT
- DEFW 2EH
- DEFW SUBB
- DEFW ZERO
- DEFW QERR
- DEFW ZERO
- DEFW BRAN
- DEFW NUMB1-$
- NUMB2 DEFW DROP
- DEFW FROMR
- DEFW ZBRAN
- DEFW NUMB3-$
- DEFW DMINU
- NUMB3 DEFW SEMIS
- ;
- DEFB 85H ; -FIND
- DEFM '-FIN'
- DEFB 'D'+80H
- DEFW NUMB-9
- DFIND DEFW DOCOL
- DEFW BL
- DEFW WORD
- DEFW HERE
- DEFW CONT
- DEFW AT
- DEFW AT
- DEFW PFIND
- DEFW DUP
- DEFW ZEQU
- DEFW ZBRAN
- DEFW DFIN1-$
- DEFW DROP
- DEFW HERE
- DEFW LATES
- DEFW PFIND
- DFIN1 DEFW SEMIS
- ;
- DEFB 87H ; (ABORT)
- DEFM '(ABORT'
- DEFB ')'+80H
- DEFW DFIND-8
- PABOR DEFW DOCOL
- DEFW ABORT
- DEFW SEMIS
- ;
- DEFB 85H ; ERROR
- DEFM 'ERRO'
- DEFB 'R'+80H
- DEFW PABOR-0AH
- ERROR DEFW DOCOL
- DEFW WARN
- DEFW AT
- DEFW ZLESS
- DEFW ZBRAN
- DEFW ERRO1-$
- DEFW PABOR
- ERRO1 DEFW HERE
- DEFW COUNT
- DEFW TYPE
- DEFW PDOTQ
- DEFB 2
- DEFM '? '
- DEFW MESS
- DEFW SPSTO
- DEFW BLK
- DEFW AT
- DEFW DDUP
- DEFW ZBRAN
- DEFW ERRO2-$
- DEFW INN
- DEFW AT
- DEFW SWAP
- ERRO2 DEFW QUIT
- ;
- DEFB 83H ; ID.
- DEFM 'ID'
- DEFB '.'+80H
- DEFW ERROR-8
- IDDOT DEFW DOCOL
- DEFW PAD
- DEFW LIT
- DEFW 20H
- DEFW LIT
- DEFW 5FH
- DEFW FILL
- DEFW DUP
- DEFW PFA
- DEFW LFA
- DEFW OVER
- DEFW SUBB
- DEFW PAD
- DEFW SWAP
- DEFW CMOVE
- DEFW PAD
- DEFW COUNT
- DEFW LIT
- DEFW 1FH
- DEFW ANDD
- DEFW TYPE
- DEFW SPACE
- DEFW SEMIS
- ;
- DEFB 86H ; CREATE
- DEFM 'CREAT'
- DEFB 'E'+80H
- DEFW IDDOT-6
- CREAT DEFW DOCOL
- DEFW DFIND
- DEFW ZBRAN
- DEFW CREA1-$
- DEFW DROP
- DEFW NFA
- DEFW IDDOT
- DEFW LIT
- DEFW 4
- DEFW MESS
- DEFW SPACE
- CREA1 DEFW HERE
- DEFW DUP
- DEFW CAT
- DEFW WIDTH
- DEFW AT
- DEFW MIN
- DEFW ONEP
- DEFW ALLOT
- DEFW DUP
- DEFW LIT
- DEFW 0A0H
- DEFW TOGGL
- DEFW HERE
- DEFW ONE
- DEFW SUBB
- DEFW LIT
- DEFW 80H
- DEFW TOGGL
- DEFW LATES
- DEFW COMMA
- DEFW CURR
- DEFW AT
- DEFW STORE
- DEFW HERE
- DEFW TWOP
- DEFW COMMA
- DEFW SEMIS
- ;
- DEFB 0C9H ; [COMPILE]
- DEFM '[COMPILE'
- DEFB ']'+80H
- DEFW CREAT-9
- BCOMP DEFW DOCOL
- DEFW DFIND
- DEFW ZEQU
- DEFW ZERO
- DEFW QERR
- DEFW DROP
- DEFW CFA
- DEFW COMMA
- DEFW SEMIS
- ;
- DEFB 0C7H ; LITERAL
- DEFM 'LITERA'
- DEFB 'L'+80H
- DEFW BCOMP-0CH
- LITER DEFW DOCOL
- DEFW STATE
- DEFW AT
- DEFW ZBRAN
- DEFW LITE1-$
- DEFW COMP
- DEFW LIT
- DEFW COMMA
- LITE1 DEFW SEMIS
- ;
- DEFB 0C8H ; DLITERAL
- DEFM 'DLITERA'
- DEFB 'L'+80H
- DEFW LITER-0AH
- DLITE DEFW DOCOL
- DEFW STATE
- DEFW AT
- DEFW ZBRAN
- DEFW DLIT1-$
- DEFW SWAP
- DEFW LITER
- DEFW LITER
- DLIT1 DEFW SEMIS
- ;
- DEFB 86H ; ?STACK
- DEFM '?STAC'
- DEFB 'K'+80H
- DEFW DLITE-0BH
- QSTAC DEFW DOCOL
- DEFW SPAT
- DEFW SZERO
- DEFW AT
- DEFW SWAP
- DEFW ULESS
- DEFW ONE
- DEFW QERR
- DEFW SPAT
- DEFW HERE
- DEFW LIT
- DEFW 80H
- DEFW PLUS
- DEFW ULESS
- DEFW LIT
- DEFW 7
- DEFW QERR
- DEFW SEMIS
- ;
- DEFB 89H ; INTERPRET
- DEFM 'INTERPRE'
- DEFB 'T'+80H
- DEFW QSTAC-9
- INTER DEFW DOCOL
- INTE1 DEFW DFIND
- DEFW ZBRAN
- DEFW INTE2-$
- DEFW STATE
- DEFW AT
- DEFW LESS
- DEFW ZBRAN
- DEFW INTE3-$
- DEFW CFA
- DEFW COMMA
- DEFW BRAN
- DEFW INTE4-$
- INTE3 DEFW CFA
- DEFW EXEC
- INTE4 DEFW QSTAC
- DEFW BRAN
- DEFW INTE5-$
- INTE2 DEFW HERE
- DEFW NUMB
- DEFW DPL
- DEFW AT
- DEFW ONEP
- DEFW ZBRAN
- DEFW INTE6-$
- DEFW DLITE
- DEFW BRAN
- DEFW INTE7-$
- INTE6 DEFW DROP
- DEFW LITER
- INTE7 DEFW QSTAC
- INTE5 DEFW BRAN
- DEFW INTE1-$
- ;
- DEFB 89H ; IMMEDIATE
- DEFM 'IMMEDIAT'
- DEFB 'E'+80H
- DEFW INTER-0CH
- IMMED DEFW DOCOL
- DEFW LATES
- DEFW LIT
- DEFW 40H
- DEFW TOGGL
- DEFW SEMIS
- ;
- DEFB 8AH ; VOCABULARY
- DEFM 'VOCABULAR'
- DEFB 'Y'+80H
- DEFW IMMED-0CH
- VOCAB DEFW DOCOL
- DEFW BUILD
- DEFW LIT
- DEFW 0A081H
- DEFW COMMA
- DEFW CURR
- DEFW AT
- DEFW CFA
- DEFW COMMA
- DEFW HERE
- DEFW VOCL
- DEFW AT
- DEFW COMMA
- DEFW VOCL
- DEFW STORE
- DEFW DOES
- DOVOC DEFW TWOP
- DEFW CONT
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C5H ; FORTH
- DEFM 'FORT'
- DEFB 'H'+80H
- DEFW VOCAB-0DH
- FORTH DEFW DODOE
- DEFW DOVOC
- DEFW 0A081H
- DEFW TASK-7
- DEFW 0 ; END OF VOCABULARY LIST
- ;
- DEFB 8BH ; DEFINITIONS
- DEFM 'DEFINITION'
- DEFB 'S'+80H
- DEFW FORTH-8
- DEFIN DEFW DOCOL
- DEFW CONT
- DEFW AT
- DEFW CURR
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C1H ; (
- DEFB '('+80H
- DEFW DEFIN-0EH
- PAREN DEFW DOCOL
- DEFW LIT
- DEFW 29H
- DEFW WORD
- DEFW SEMIS
- ;
- DEFB 84H ; QUIT
- DEFM 'QUI'
- DEFB 'T'+80H
- DEFW PAREN-4
- QUIT DEFW DOCOL
- DEFW ZERO
- DEFW BLK
- DEFW STORE
- DEFW LBRAC
- QUIT1 DEFW RPSTO
- DEFW CR
- DEFW QUERY
- DEFW INTER
- DEFW STATE
- DEFW AT
- DEFW ZEQU
- DEFW ZBRAN
- DEFW QUIT2-$
- DEFW PDOTQ
- DEFB 2
- DEFB 111
- DEFB 107
- QUIT2 DEFW BRAN
- DEFW QUIT1-$
- ;
- DEFB 85H ; ABORT
- DEFM 'ABOR'
- DEFB 'T'+80H
- DEFW QUIT-7
- ABORT DEFW DOCOL
- DEFW SPSTO
- DEFW DECI
- DEFW QSTAC
- DEFW PAGE
- DEFW DOTCPU
- DEFW PDOTQ
- DEFB 0DH
- DEFM 'FIG-FORTH '
- DEFB FIGREL+30H
- DEFB ADOT
- DEFB FIGREV+30H
- DEFW FORTH
- DEFW DEFIN
- DEFW QUIT
- ;
- WRM LD BC,WRM1
- JP NEXT
- WRM1 DEFW WARM
- ;
- DEFB 84H ; WARM
- DEFM 'WAR'
- DEFB 'M'+80H
- DEFW ABORT-8
- WARM DEFW DOCOL
- DEFW MTBUF
- DEFW ABORT
- ;
- CLD LD BC,CLD1
- LD HL,(ORIG+12H)
- LD SP,HL
- JP NEXT
- CLD1 DEFW COLD
- ;
- DEFB 84H ; COLD
- DEFM 'COL'
- DEFB 'D'+80H
- DEFW WARM-7
- COLD DEFW DOCOL
- DEFW MTBUF
- DEFW ZERO
- DEFW DENSTY
- DEFW STORE
- DEFW LIT
- DEFW BUF1
- DEFW USE
- DEFW STORE
- DEFW LIT
- DEFW BUF1
- DEFW PREV
- DEFW STORE
- DEFW DRZER
- DEFW LIT
- DEFW 0
- DEFW LIT
- DEFW EPRINT
- DEFW STORE
- ;
- DEFW LIT
- DEFW ORIG+12H
- DEFW LIT
- DEFW UP
- DEFW AT
- DEFW LIT
- DEFW 6
- DEFW PLUS
- DEFW LIT
- DEFW 10H
- DEFW CMOVE
- DEFW LIT
- DEFW ORIG+0CH
- DEFW AT
- DEFW LIT
- DEFW FORTH+6
- DEFW STORE
- DEFW ABORT
- ;
- DEFB 84H ; S->D
- DEFM 'S->'
- DEFB 'D'+80H
- DEFW COLD-7
- STOD DEFW $+2
- POP DE
- LD HL,0
- LD A,D
- AND 80H
- JR Z,STOD1
- DEC HL
- STOD1 JP DPUSH
- ;
- DEFB 82H ; +-
- DEFB '+'
- DEFB '-'+80H
- DEFW STOD-7
- PM DEFW DOCOL
- DEFW ZLESS
- DEFW ZBRAN
- DEFW PM1-$
- DEFW MINUS
- PM1 DEFW SEMIS
- ;
- DEFB 83H ; D+-
- DEFM 'D+'
- DEFB '-'+80H
- DEFW PM-5
- DPM DEFW DOCOL
- DEFW ZLESS
- DEFW ZBRAN
- DEFW DPM1-$
- DEFW DMINU
- DPM1 DEFW SEMIS
- ;
- DEFB 83H ; ABS
- DEFM 'AB'
- DEFB 'S'+80H
- DEFW DPM-6
- ABS DEFW DOCOL
- DEFW DUP
- DEFW PM
- DEFW SEMIS
- ;
- DEFB 84H ; DABS
- DEFM 'DAB'
- DEFB 'S'+80H
- DEFW ABS-6
- DABS DEFW DOCOL
- DEFW DUP
- DEFW DPM
- DEFW SEMIS
- ;
- DEFB 83H ; MIN
- DEFM 'MI'
- DEFB 'N'+80H
- DEFW DABS-7
- MIN DEFW DOCOL
- DEFW TDUP
- DEFW GREAT
- DEFW ZBRAN
- DEFW MIN1-$
- DEFW SWAP
- MIN1 DEFW DROP
- DEFW SEMIS
- ;
- DEFB 83H ; MAX
- DEFM 'MA'
- DEFB 'X'+80H
- DEFW MIN-6
- MAX DEFW DOCOL
- DEFW TDUP
- DEFW LESS
- DEFW ZBRAN
- DEFW MAX1-$
- DEFW SWAP
- MAX1 DEFW DROP
- DEFW SEMIS
- ;
- DEFB 82H ; M*
- DEFB 'M'
- DEFB '*'+80H
- DEFW MAX-6
- MSTAR DEFW DOCOL
- DEFW TDUP
- DEFW XORR
- DEFW TOR
- DEFW ABS
- DEFW SWAP
- DEFW ABS
- DEFW USTAR
- DEFW FROMR
- DEFW DPM
- DEFW SEMIS
- ;
- DEFB 82H ; M/
- DEFB 'M'
- DEFB '/'+80H
- DEFW MSTAR-5
- MSLAS DEFW DOCOL
- DEFW OVER
- DEFW TOR
- DEFW TOR
- DEFW DABS
- DEFW RR1
- DEFW ABS
- DEFW USLAS
- DEFW FROMR
- DEFW RR1
- DEFW XORR
- DEFW PM
- DEFW SWAP
- DEFW FROMR
- DEFW PM
- DEFW SWAP
- DEFW SEMIS
- ;
- DEFB 81H ; *
- DEFB '*'+80H
- DEFW MSLAS-5
- STAR DEFW DOCOL
- DEFW MSTAR
- DEFW DROP
- DEFW SEMIS
- ;
- DEFB 84H ; /MOD
- DEFM '/MO'
- DEFB 'D'+80H
- DEFW STAR-4
- SLMOD DEFW DOCOL
- DEFW TOR
- DEFW STOD
- DEFW FROMR
- DEFW MSLAS
- DEFW SEMIS
- ;
- DEFB 81H ; /
- DEFB '/'+80H
- DEFW SLMOD-7
- SLASH DEFW DOCOL
- DEFW SLMOD
- DEFW SWAP
- DEFW DROP
- DEFW SEMIS
- ;
- DEFB 83H ; MOD
- DEFM 'MO'
- DEFB 'D'+80H
- DEFW SLASH-4
- MODD DEFW DOCOL
- DEFW SLMOD
- DEFW DROP
- DEFW SEMIS
- ;
- DEFB 85H ; */MOD
- DEFM '*/MO'
- DEFB 'D'+80H
- DEFW MODD-6
- SSMOD DEFW DOCOL
- DEFW TOR
- DEFW MSTAR
- DEFW FROMR
- DEFW MSLAS
- DEFW SEMIS
- ;
- DEFB 82H ; */
- DEFB '*'
- DEFB '/'+80H
- DEFW SSMOD-8
- SSLA DEFW DOCOL
- DEFW SSMOD
- DEFW SWAP
- DEFW DROP
- DEFW SEMIS
- ;
- DEFB 85H ; M/MOD
- DEFM 'M/MO'
- DEFB 'D'+80H
- DEFW SSLA-5
- MSMOD DEFW DOCOL
- DEFW TOR
- DEFW ZERO
- DEFW RR1
- DEFW USLAS
- DEFW FROMR
- DEFW SWAP
- DEFW TOR
- DEFW USLAS
- DEFW FROMR
- DEFW SEMIS
- ;
- DEFB 86H ; (LINE)
- DEFM '(LINE'
- DEFB ')'+80H
- DEFW MSMOD-8
- PLINE DEFW DOCOL
- DEFW TOR
- DEFW CSLL
- DEFW LIT
- DEFW LPSCR*CPLL
- DEFW SSMOD
- DEFW FROMR
- DEFW BSCR
- DEFW STAR
- DEFW PLUS
- DEFW BLOCK
- DEFW PLUS
- DEFW CSLL
- DEFW SEMIS
- ;
- DEFB 85H ; .LINE
- DEFM '.LIN'
- DEFB 'E'+80H
- DEFW PLINE-9
- DLINE DEFW DOCOL
- DEFW PLINE
- DEFW DTRAI
- DEFW TYPE
- DEFW SEMIS
- ;
- DEFB 87H ; MESSAGE
- DEFM 'MESSAG'
- DEFB 'E'+80H
- DEFW DLINE-8
- MESS DEFW DOCOL
- DEFW WARN
- DEFW AT
- DEFW ZBRAN
- DEFW MESS1-$
- DEFW DDUP
- DEFW ZBRAN
- DEFW MESS2-$
- DEFW LIT
- DEFW 4
- DEFW OFSET
- DEFW AT
- DEFW BSCR
- DEFW SLASH
- DEFW SUBB
- DEFW DLINE
- DEFW SPACE
- MESS2 DEFW BRAN
- DEFW MESS3-$
- MESS1 DEFW PDOTQ
- DEFB 6
- DEFM 'MSG # '
- DEFW DOT
- MESS3 DEFW SEMIS
- ;
- ;------------------------------
- ;
- ; 8080 PORT FETCH AND STORE
- ; ( SELF MODIFYING CODE, NOT REENTRANT )
- ;
- DEFB 82H ; P@ PORT FETCH
- DEFB 'P'
- DEFB '@'+80H
- DEFW MESS-0AH
- PTAT DEFW $+2
- POP DE ; E <- PORT#
- LD HL,$+5
- LD (HL),E
- IN A,(0)
- LD L,A
- LD H,0
- JP HPUSH
- ;
- DEFB 82H ; "PORT STORE"
- DEFB 'P'
- DEFB '!'+80H
- DEFW PTAT-5
- PTSTO DEFW $+2
- POP DE
- LD HL,$+7
- LD (HL),E
- POP HL ; H <- CDATA
- LD A,L
- OUT (0),A
- JP NEXT
- ;
- ;-----------------------------
- ; DISK INTERFACE
- ;
- ; DOUBLE DENSITY
- SPT2 EQU 8 ; SECTORS/TRACK
- TRKS2 EQU 80 ; # TRACKS
- ; SINGLE DENSITY
- SPT1 EQU 8 ; SECTORS/TRACK
- TRKS1 EQU 40 ; # TRACKS
- BPS EQU 256 ; BYTES/SECTOR
- MXDRV EQU 2 ; MAX # DRIVES
- ;
- ; FORTH VARIABLES AND CONSTANTS USED IN DISK INTERFACE
- ;
- DEFB 85H ; DRIVE ( CURRENT DRIVE # )
- DEFM 'DRIV'
- DEFB 'E'+80H
- DEFW PTSTO-5
- DRIVE DEFW DOVAR
- DEFW 0
- ;
- DEFB 83H ; SEC ( SECTOR # )
- DEFM 'SE'
- DEFB 'C'+80H
- DEFW DRIVE-8
- SEC DEFW DOVAR
- DEFW 0
- ;
- DEFB 85H ; TRACK ( TRACK # )
- DEFM 'TRAC'
- DEFB 'K'+80H
- DEFW SEC-6
- TRACK DEFW DOVAR
- DEFW 0
- ;
- DEFB 83H ; USE ( ADDR OF NEXT BUFFER TO USE )
- DEFM 'US'
- DEFB 'E'+80H
- DEFW TRACK-8
- USE DEFW DOVAR
- DEFW BUF1
- ;
- DEFB 84H ; PREV
- DEFM 'PRE'
- DEFB 'V'+80H
- DEFW USE-6
- PREV DEFW DOVAR
- DEFW BUF1
- ;
- DEFB 87H ; SEC/BLK ( # SECTORS/BLOCK )
- DEFM 'SEC/BL'
- DEFB 'K'+80H
- DEFW PREV-7
- SPBLK DEFW DOCON
- DEFW KBBUF/BPS
- ;
- DEFB 85H ; #BUFF ( NUMBER OF BUFFERS )
- DEFM '#BUF'
- DEFB 'F'+80H
- DEFW SPBLK-10
- NOBUF DEFW DOCON
- DEFW NBUF
- ;
- DEFB 87H ; DENSITY ( 0 = SINGLE, 1 = DOUBLE )
- DEFM 'DENSIT'
- DEFB 'Y'+80H
- DEFW NOBUF-8
- DENSTY DEFW DOVAR
- DEFW 0
- ;
- DEFB 8AH ; DISK-ERROR ( DISK ERROR STATUS )
- DEFM 'DISK-ERRO'
- DEFB 'R'+80H
- DEFW DENSTY-10
- DSKERR DEFW DOVAR
- DEFW 0
- ;
- ; DISK INTERFACE HIGH-LEVEL ROUTINES
- ;
- DEFB 84H ; +BUF ( ADVANCE BUFFER )
- DEFM '+BU'
- DEFB 'F'+80H
- DEFW DSKERR-13
- PBUF DEFW DOCOL
- DEFW LIT
- DEFW CO
- DEFW PLUS
- DEFW DUP
- DEFW LIMIT
- DEFW EQUAL
- DEFW ZBRAN
- DEFW PBUF1-$
- DEFW DROP
- DEFW FIRST
- PBUF1 DEFW DUP
- DEFW PREV
- DEFW AT
- DEFW SUBB
- DEFW SEMIS
- ;
- DEFB 86H ; UPDATE
- DEFM 'UPDAT'
- DEFB 'E'+80H
- DEFW PBUF-7
- UPDAT DEFW DOCOL
- DEFW PREV
- DEFW AT
- DEFW AT
- DEFW LIT
- DEFW 8000H
- DEFW ORR
- DEFW PREV
- DEFW AT
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 8DH ; EMPTY-BUFFERS
- DEFM 'EMPTY-BUFFER'
- DEFB 'S'+80H
- DEFW UPDAT-9
- MTBUF DEFW DOCOL
- DEFW FIRST
- DEFW LIMIT
- DEFW OVER
- DEFW SUBB
- DEFW ERASEE
- DEFW SEMIS
- ;
- DEFB 83H ; DR0
- DEFM 'DR'
- DEFB '0'+80H
- DEFW MTBUF-16
- DRZER DEFW DOCOL
- DEFW ZERO
- DEFW OFSET
- DEFW STORE
- DEFW SEMIS
- ;
- SPBLKK EQU KBBUF/BPS ; SECTORS/BLOCK
- SCRDV1 EQU SPDRV1/SPBLKK ; SCREENS PER DRIVE 1
- SCRDV2 EQU SPDRV2/SPBLKK ; SCREENS PER DRIVE 2
- DEFB 83H ; DR1
- DEFM 'DR'
- DEFB '1'+80H
- DEFW DRZER-6
- DRONE DEFW DOCOL
- DEFW DENSTY
- DEFW AT
- DEFW ZBRAN
- DEFW DRON1-$
- DEFW LIT
- DEFW SCRDV2
- DEFW BRAN
- DEFW DRON2-$
- DRON1 DEFW LIT
- DEFW SCRDV1
- DRON2 DEFW OFSET
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 86H ; BUFFER
- DEFM 'BUFFE'
- DEFB 'R'+80H
- DEFW DRONE-6
- BUFFE DEFW DOCOL
- DEFW USE
- DEFW AT
- DEFW DUP
- DEFW TOR
- BUFF1 DEFW PBUF
- DEFW ZBRAN
- DEFW BUFF1-$
- DEFW USE
- DEFW STORE
- DEFW RR1
- DEFW AT
- DEFW ZLESS
- DEFW ZBRAN
- DEFW BUFF2-$
- DEFW RR1
- DEFW TWOP
- DEFW RR1
- DEFW AT
- DEFW LIT
- DEFW 7FFFH
- DEFW ANDD
- DEFW ZERO
- DEFW RSLW
- BUFF2 DEFW RR1
- DEFW STORE
- DEFW RR1
- DEFW PREV
- DEFW STORE
- DEFW FROMR
- DEFW TWOP
- DEFW SEMIS
- ;
- DEFB 85H ; BLOCK
- DEFM 'BLOC'
- DEFB 'K'+80H
- DEFW BUFFE-9
- BLOCK DEFW DOCOL
- DEFW OFSET
- DEFW AT
- DEFW PLUS
- DEFW TOR
- DEFW PREV
- DEFW AT
- DEFW DUP
- DEFW AT
- DEFW RR1
- DEFW SUBB
- DEFW DUP
- DEFW PLUS
- DEFW ZBRAN
- DEFW BLOC1-$
- BLOC2 DEFW PBUF
- DEFW ZEQU
- DEFW ZBRAN
- DEFW BLOC3-$
- DEFW DROP
- DEFW RR1
- DEFW BUFFE
- DEFW DUP
- DEFW RR1
- DEFW ONE
- DEFW RSLW
- DEFW TWO
- DEFW SUBB
- BLOC3 DEFW DUP
- DEFW AT
- DEFW RR1
- DEFW SUBB
- DEFW DUP
- DEFW PLUS
- DEFW ZEQU
- DEFW ZBRAN
- DEFW BLOC2-$
- DEFW DUP
- DEFW PREV
- DEFW STORE
- BLOC1 DEFW FROMR
- DEFW DROP
- DEFW TWOP
- DEFW SEMIS
- ;
- ; LOW LEVEL ROUTINES
- DEFB 89H ; SET-DRIVE
- DEFM 'SET-DRIV'
- DEFB 'E'+80H
- DEFW BLOCK-8
- SETDRV DEFW $+2
- LD A,(DRIVE+2)
- LD (64769),A
- JP NEXT
- ;
- ; CALCULATES DRIVE#, TRACK# & SECTOR#
- ;
- DEFB 87H ; T&SCALC
- DEFM 'T&SCAL'
- DEFB 'C'+80H
- DEFW SETDRV-12
- TSCALC DEFW DOCOL
- DEFW DENSTY
- DEFW AT
- DEFW ZBRAN
- DEFW TSCALS-$
- DEFW LIT
- DEFW SPDRV2
- DEFW SLMOD
- DEFW LIT
- DEFW MXDRV
- DEFW MIN
- DEFW DUP
- DEFW DRIVE
- DEFW AT
- DEFW EQUAL
- DEFW ZBRAN
- DEFW TSCAL1-$
- DEFW DROP
- DEFW BRAN
- DEFW TSCAL2-$
- TSCAL1 DEFW DRIVE
- DEFW STORE
- DEFW SETDRV
- TSCAL2 DEFW LIT
- DEFW 25 ; DISPLACEMENT
- DEFW PLUS
- DEFW LIT
- DEFW SPT2
- DEFW SLMOD
- DEFW TRACK
- DEFW STORE
- DEFW SEC
- DEFW STORE
- DEFW SEMIS
- ; SINGLE DENSITY
- TSCALS DEFW LIT
- DEFW SPDRV1
- DEFW SLMOD
- DEFW LIT
- DEFW MXDRV
- DEFW MIN
- DEFW DUP
- DEFW DRIVE
- DEFW AT
- DEFW EQUAL
- DEFW ZBRAN
- DEFW TSCAL3-$
- DEFW DROP
- DEFW BRAN
- DEFW TSCAL4-$
- TSCAL3 DEFW DRIVE
- DEFW STORE
- DEFW SETDRV
- TSCAL4 DEFW LIT
- DEFW 25 ; DISPLACEMENT
- DEFW PLUS
- DEFW LIT
- DEFW SPT1
- DEFW SLMOD
- DEFW TRACK
- DEFW STORE
- DEFW SEC
- DEFW STORE
- DEFW SEMIS
- ;
- ;SEC-READ
- ; READ A SECTOR AND TRANSFER TO MEMORY POINTED OUT BY USE
- ;
- ; SPECIFIC FOR ABC80
- ;
- DEFB 88H ; SEC-READ
- DEFM 'SEC-REA'
- DEFB 'D'+80H
- DEFW TSCALC-10
- SECRD DEFW $+2
- LD (SAVEBC),BC
- LD A,(SEC+2)
- LD B,5
- SECR1 SLA A
- DJNZ SECR1
- LD E,A
- LD A,(TRACK+2)
- LD D,A
- CALL 24678 ; TRANSFER SECTOR TO MEM STARTING 62720
- LD DE,(USE+2) ; DESINATION
- LD HL,62720 ; SOURCE
- LD BC,BPS ; COUNT
- LDIR
- LD BC,(SAVEBC)
- LD A,(64789)
- LD (DSKERR+2),A
- JP NEXT
- ;
- ; SEC-WRITE
- ; TRANSFER FROM MEM TO DISKBUFF AT 62720, THEN WRITE ON DISK
- ; SPECIFIC FOR ABC80
- ;
- DEFB 89H ; SEC-WRITE
- DEFM 'SEC-WRIT'
- DEFB 'E'+80H
- DEFW SECRD-11
- SECWT DEFW $+2
- LD (SAVEBC),BC
- LD BC,BPS
- LD DE,62720 ; DESTINATION
- LD HL,(USE+2) ; SOURCE
- LDIR
- LD A,(SEC+2)
- LD B,5
- SECW1 SLA A
- DJNZ SECW1
- LD E,A
- LD A,(TRACK+2)
- LD D,A
- CALL 24675 ; WRITE SECTOR
- LD A,(64789) ; ERROR FLAG
- LD (DSKERR+2),A
- LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 83H ; R/W
- DEFM 'R/'
- DEFB 'W'+80H
- DEFW SECWT-12
- RSLW DEFW DOCOL
- DEFW USE
- DEFW AT
- DEFW TOR
- DEFW SWAP
- DEFW ONE
- DEFW SUBB
- DEFW SPBLK
- DEFW STAR
- DEFW ROT
- DEFW USE
- DEFW STORE
- DEFW SPBLK
- DEFW ZERO
- DEFW XDO
- RSLW1 DEFW OVER
- DEFW OVER
- DEFW TSCALC
- DEFW ZBRAN
- DEFW RSLW2-$
- DEFW SECRD
- DEFW BRAN
- DEFW RSLW2+2-$
- RSLW2 DEFW SECWT
- DEFW ONEP
- DEFW LIT
- DEFW BPS
- DEFW USE
- DEFW PSTOR
- DEFW XLOOP
- DEFW RSLW1-$
- DEFW DROP
- DEFW DROP
- DEFW FROMR
- DEFW USE
- DEFW STORE
- DEFW QDISK
- DEFW SEMIS
- ;
- DEFB 85H ; FLUSH
- DEFM 'FLUS'
- DEFB 'H'+80H
- DEFW RSLW-6
- FLUSH DEFW DOCOL
- DEFW NOBUF
- DEFW ONEP
- DEFW ZERO
- DEFW XDO
- FLUS1 DEFW ZERO
- DEFW BUFFE
- DEFW DROP
- DEFW XLOOP
- DEFW FLUS1-$
- DEFW SEMIS
- ;
- DEFB 84H ; LOAD
- DEFM 'LOA'
- DEFB 'D'+80H
- DEFW FLUSH-8
- LOAD DEFW DOCOL
- DEFW BLK
- DEFW AT
- DEFW TOR
- DEFW INN
- DEFW AT
- DEFW TOR
- DEFW ZERO
- DEFW INN
- DEFW STORE
- DEFW BSCR
- DEFW STAR
- DEFW BLK
- DEFW STORE
- DEFW INTER
- DEFW FROMR
- DEFW INN
- DEFW STORE
- DEFW FROMR
- DEFW BLK
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C3H ; -->
- DEFM '--'
- DEFB '>'+80H
- DEFW LOAD-7
- ARROW DEFW DOCOL
- DEFW QLOAD
- DEFW ZERO
- DEFW INN
- DEFW STORE
- DEFW BSCR
- DEFW BLK
- DEFW AT
- DEFW OVER
- DEFW MODD
- DEFW SUBB
- DEFW BLK
- DEFW PSTOR
- DEFW SEMIS
- ;
- ; CONSOLE AND PRINTER INTERFACE
- ;
- DEFB 83H ; ?PR
- DEFM '?P'
- DEFB 'R'+80H
- DEFW ARROW-6
- QPR DEFW DOCON
- EPRINT DEFW 0 ; ENABLE PRINTER VARIABLE
- ;
- DEFB 83H ; #CR
- DEFM '#C'
- DEFB 'R'+80H
- DEFW QPR-6
- NRCR DEFW DOVAR
- DEFW 0
- CHROUT DEFW 0
- ; ( 0 = DISABLED, 1 = ENABLED )
- CSTAT LD A,0
- PUSH HL
- LD HL,TGBF
- BIT 7,(HL)
- POP HL
- RET Z
- LD A,0FFH
- RET
- ;
- CIN PUSH BC
- PUSH IX
- CALL 0002H
- RES 7,A
- POP IX
- POP BC
- RET
- ;
- COUT PUSH HL
- LD B,0DH
- LD (CHROUT),BC
- LD BC,1
- LD HL,CHROUT
- PUSH IX
- CALL 000BH
- POP IX
- POP HL
- RET
- ;
- CPOUT CALL COUT
- EX DE,HL
- LD A,(EPRINT)
- BIT 0,A
- RET Z
- ;
- ; USE OPTIONSPROM 7-2 OR 7-1
- ;
- PUSH DE
- PUSH BC
- LD HL,NAMFLD+15
- LD A,1
- CP (HL)
- JR Z,LADD ; FILNAMN FINNS
- LD A,32
- LD B,14
- LD HL,NAMFLD
- N[STA LD (HL),A
- INC HL
- DJNZ N[STA
- ;
- LADD POP BC
- LD HL,NAMFLD
- LD DE,NAMFLD
- LD IX,PRBLK
- LD (IX+5),1
- LD (IX+6),0
- EX AF,AF'
- EXX
- LD HL,7117H ; UNDERSÖK PROM
- LD A,24H ; 24H OM NYTT 92H OM GAMMALT
- CP (HL) ; KOLLA OM KOD ÄR 1
- JR Z,PROM72 ; DET VAR DET NYA HOPPA
- EXX
- EX AF,AF'
- LD A,0
- CALL 710DH
- JR PR71
- PROM72 EXX
- EX AF,AF'
- LD A,0
- CALL 7124H
- PR71 LD HL,CHROUT
- POP DE
- LD (HL),E
- LD BC,1
- LD A,4 ; PRINTKOMMANDO
- EX AF,AF'
- EXX
- LD HL,7117H
- LD A,24H
- CP (HL)
- JR Z,PRO72
- EXX
- EX AF,AF'
- JP 710DH
- PRO72 EXX
- EX AF,AF'
- JP 7124H
- ;
- LOW EQU 0
- HIGH EQU 8
- ;
- PQTER CALL CSTAT
- LD HL,0
- OR A
- JR Z,PQTE1
- INC L
- PQTE1 JP HPUSH
- ;
- PKEY CALL CIN
- LD L,A
- LD H,0
- JP HPUSH
- ;
- PEMIT DEFW $+2 ; (EMIT)
- POP HL
- PUSH BC
- LD C,L
- CALL CPOUT
- POP BC
- JP NEXT
- ;
- PCR PUSH BC
- LD C,ACR
- LD L,C
- CALL CPOUT
- LD C,LF
- LD L,C
- CALL CPOUT
- LD HL,(NRCR+2)
- INC HL
- LD (NRCR+2),HL
- POP BC
- JP NEXT
- ;
- ; END OF INTERFACE ROUTINES
- ;
- DEFB 0C1H ; ' (TICK)
- DEFB 0A7H
- DEFW NRCR-6
- TICK DEFW DOCOL
- DEFW DFIND
- DEFW ZEQU
- DEFW ZERO
- DEFW QERR
- DEFW DROP
- DEFW LITER
- DEFW SEMIS
- ;
- DEFB 86H ; FORGET
- DEFM 'FORGE'
- DEFB 'T'+80H
- DEFW TICK-4
- FORG DEFW DOCOL
- DEFW CURR
- DEFW AT
- DEFW CONT
- DEFW AT
- DEFW SUBB
- DEFW LIT
- DEFW LPSCR+8
- DEFW QERR
- DEFW TICK
- DEFW DUP
- DEFW FENCE
- DEFW AT
- DEFW LESS
- DEFW LIT
- DEFW LPSCR+5
- DEFW QERR
- DEFW DUP
- DEFW NFA
- DEFW DP
- DEFW STORE
- DEFW LFA
- DEFW AT
- DEFW CONT
- DEFW AT
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 84H ; BACK
- DEFM 'BAC'
- DEFB 'K'+80H
- DEFW FORG-9
- BACK DEFW DOCOL
- DEFW HERE
- DEFW SUBB
- DEFW COMMA
- DEFW SEMIS
- ;
- DEFB 0C5H ; BEGIN
- DEFM 'BEGI'
- DEFB 'N'+80H
- DEFW BACK-7
- BEGIN DEFW DOCOL
- DEFW QCOMP
- DEFW HERE
- DEFW ONE
- DEFW SEMIS
- ;
- DEFB 0C5H ; ENDIF
- DEFM 'ENDI'
- DEFB 'F'+80H
- DEFW BEGIN-8
- ENDIFF DEFW DOCOL
- DEFW QCOMP
- DEFW TWO
- DEFW QPAIR
- DEFW HERE
- DEFW OVER
- DEFW SUBB
- DEFW SWAP
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C4H ; THEN
- DEFM 'THE'
- DEFB 'N'+80H
- DEFW ENDIFF-8
- THEN DEFW DOCOL
- DEFW ENDIFF
- DEFW SEMIS
- ;
- DEFB 0C2H ; DO
- DEFB 'D'
- DEFB 'O'+80H
- DEFW THEN-7
- DO DEFW DOCOL
- DEFW COMP
- DEFW XDO
- DEFW HERE
- DEFW THREE
- DEFW SEMIS
- ;
- DEFB 0C4H ; LOOP
- DEFM 'LOO'
- DEFB 'P'+80H
- DEFW DO-5
- LOOP DEFW DOCOL
- DEFW THREE
- DEFW QPAIR
- DEFW COMP
- DEFW XLOOP
- DEFW BACK
- DEFW SEMIS
- ;
- DEFB 0C5H ; +LOOP
- DEFM '+LOO'
- DEFB 'P'+80H
- DEFW LOOP-7
- PLOOP DEFW DOCOL
- DEFW THREE
- DEFW QPAIR
- DEFW COMP
- DEFW XPLOO
- DEFW BACK
- DEFW SEMIS
- ;
- DEFB 0C5H ; UNTIL
- DEFM 'UNTI'
- DEFB 'L'+80H
- DEFW PLOOP-8
- UNTIL DEFW DOCOL
- DEFW ONE
- DEFW QPAIR
- DEFW COMP
- DEFW ZBRAN
- DEFW BACK
- DEFW SEMIS
- ;
- DEFB 0C3H ; END
- DEFM 'EN'
- DEFB 'D'+80H
- DEFW UNTIL-8
- ENDD DEFW DOCOL
- DEFW UNTIL
- DEFW SEMIS
- ;
- DEFB 0C5H ; AGAIN
- DEFM 'AGAI'
- DEFB 'N'+80H
- DEFW ENDD-6
- AGAIN DEFW DOCOL
- DEFW ONE
- DEFW QPAIR
- DEFW COMP
- DEFW BRAN
- DEFW BACK
- DEFW SEMIS
- ;
- DEFB 0C6H ; REPEAT
- DEFM 'REPEA'
- DEFB 'T'+80H
- DEFW AGAIN-8
- REPEA DEFW DOCOL
- DEFW TOR
- DEFW TOR
- DEFW AGAIN
- DEFW FROMR
- DEFW FROMR
- DEFW TWO
- DEFW SUBB
- DEFW ENDIFF
- DEFW SEMIS
- ;
- DEFB 0C2H ; IF
- DEFB 'I'
- DEFB 'F'+80H
- DEFW REPEA-9
- IFF DEFW DOCOL
- DEFW COMP
- DEFW ZBRAN
- DEFW HERE
- DEFW ZERO
- DEFW COMMA
- DEFW TWO
- DEFW SEMIS
- ;
- DEFB 0C4H ; ELSE
- DEFM 'ELS'
- DEFB 'E'+80H
- DEFW IFF-5
- ELSEE DEFW DOCOL
- DEFW TWO
- DEFW QPAIR
- DEFW COMP
- DEFW BRAN
- DEFW HERE
- DEFW ZERO
- DEFW COMMA
- DEFW SWAP
- DEFW TWO
- DEFW ENDIFF
- DEFW TWO
- DEFW SEMIS
- ;
- DEFB 0C5H ; WHILE
- DEFM 'WHIL'
- DEFB 'E'+80H
- DEFW ELSEE-7
- WHILE DEFW DOCOL
- DEFW IFF
- DEFW TWOP
- DEFW SEMIS
- ;
- DEFB 86H ; SPACES
- DEFM 'SPACE'
- DEFB 'S'+80H
- DEFW WHILE-8
- SPACS DEFW DOCOL
- DEFW ZERO
- DEFW MAX
- DEFW DDUP
- DEFW ZBRAN
- DEFW SPAX1-$
- DEFW ZERO
- DEFW XDO
- SPAX2 DEFW SPACE
- DEFW XLOOP
- DEFW SPAX2-$
- SPAX1 DEFW SEMIS
- ;
- DEFB 82H ; <#
- DEFB '<'
- DEFB '#'+80H
- DEFW SPACS-9
- BDIGS DEFW DOCOL
- DEFW PAD
- DEFW HLD
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 82H ; #>
- DEFB '#'
- DEFB '>'+80H
- DEFW BDIGS-5
- EDIGS DEFW DOCOL
- DEFW DROP
- DEFW DROP
- DEFW HLD
- DEFW AT
- DEFW PAD
- DEFW OVER
- DEFW SUBB
- DEFW SEMIS
- ;
- DEFB 84H ; SIGN
- DEFM 'SIG'
- DEFB 'N'+80H
- DEFW EDIGS-5
- SIGN DEFW DOCOL
- DEFW ROT
- DEFW ZLESS
- DEFW ZBRAN
- DEFW SIGN1-$
- DEFW LIT
- DEFW 2DH
- DEFW HOLD
- SIGN1 DEFW SEMIS
- ;
- DEFB 81H ; #
- DEFB '#'+80H
- DEFW SIGN-7
- DIG DEFW DOCOL
- DEFW BASE
- DEFW AT
- DEFW MSMOD
- DEFW ROT
- DEFW LIT
- DEFW 9
- DEFW OVER
- DEFW LESS
- DEFW ZBRAN
- DEFW DIG1-$
- DEFW LIT
- DEFW 7
- DEFW PLUS
- DIG1 DEFW LIT
- DEFW 30H
- DEFW PLUS
- DEFW HOLD
- DEFW SEMIS
- ;
- DEFB 82H ; #S
- DEFB '#'
- DEFB 'S'+80H
- DEFW DIG-4
- DIGS DEFW DOCOL
- DIGS1 DEFW DIG
- DEFW OVER
- DEFW OVER
- DEFW ORR
- DEFW ZEQU
- DEFW ZBRAN
- DEFW DIGS1-$
- DEFW SEMIS
- ;
- DEFB 83H ; D.R
- DEFM 'D.'
- DEFB 'R'+80H
- DEFW DIGS-5
- DDOTR DEFW DOCOL
- DEFW TOR
- DEFW SWAP
- DEFW OVER
- DEFW DABS
- DEFW BDIGS
- DEFW DIGS
- DEFW SIGN
- DEFW EDIGS
- DEFW FROMR
- DEFW OVER
- DEFW SUBB
- DEFW SPACS
- DEFW TYPE
- DEFW SEMIS
- ;
- DEFB 82H ; .R
- DEFB '.'
- DEFB 'R'+80H
- DEFW DDOTR-6
- DOTR DEFW DOCOL
- DEFW TOR
- DEFW STOD
- DEFW FROMR
- DEFW DDOTR
- DEFW SEMIS
- ;
- DEFB 82H ; D.
- DEFB 'D'
- DEFB '.'+80H
- DEFW DOTR-5
- DDOT DEFW DOCOL
- DEFW ZERO
- DEFW DDOTR
- DEFW SPACE
- DEFW SEMIS
- ;
- DEFB 81H ; .
- DEFB '.'+80H
- DEFW DDOT-5
- DOT DEFW DOCOL
- DEFW STOD
- DEFW DDOT
- DEFW SEMIS
- ;
- DEFB 81H ; ?
- DEFB '?'+80H
- DEFW DOT-4
- QUES DEFW DOCOL
- DEFW AT
- DEFW DOT
- DEFW SEMIS
- ;
- DEFB 82H ; U.
- DEFB 'U'
- DEFB '.'+80H
- DEFW QUES-4
- UDOT DEFW DOCOL
- DEFW ZERO
- DEFW DDOT
- DEFW SEMIS
- ;
- DEFB 85H ; VLIST
- DEFM 'VLIS'
- DEFB 'T'+80H
- DEFW UDOT-5
- VLIST DEFW DOCOL
- DEFW LIT
- DEFW 80H
- DEFW OUTT
- DEFW STORE
- DEFW CONT
- DEFW AT
- DEFW AT
- VLIS1 DEFW OUTT
- DEFW AT
- DEFW CSLL
- DEFW GREAT
- DEFW ZBRAN
- DEFW VLIS2-$
- DEFW CR
- DEFW ZERO
- DEFW OUTT
- DEFW STORE
- VLIS2 DEFW DUP
- DEFW IDDOT
- DEFW SPACE
- DEFW SPACE
- DEFW PFA
- DEFW LFA
- DEFW AT
- DEFW DUP
- DEFW ZEQU
- DEFW QTERM
- DEFW ORR
- DEFW ZBRAN
- DEFW VLIS1-$
- DEFW DROP
- DEFW SEMIS
- ;
- ; EXIT SYSTEM
- ;
- DEFB 83H ; BYE
- DEFM 'BY'
- DEFB 'E'+80H
- DEFW VLIST-8
- BYE DEFW $+2
- JP 0
- ;
- DEFB 84H ; LIST
- DEFM 'LIS'
- DEFB 'T'+80H
- DEFW BYE-6
- LIST DEFW DOCOL
- DEFW DECI
- DEFW CR
- DEFW DUP
- DEFW SCR
- DEFW STORE
- DEFW PDOTQ
- DEFB 6
- DEFM 'SCR # '
- DEFW DOT
- DEFW LIT
- DEFW LPSCR ; 23 LINES FOR ABC80
- DEFW ZERO
- DEFW XDO
- LIST1 DEFW CR
- DEFW IDO
- DEFW LIT
- DEFW 2
- DEFW DOTR
- DEFW SPACE
- DEFW IDO
- DEFW SCR
- DEFW AT
- DEFW DLINE
- DEFW QTERM
- DEFW ZBRAN
- DEFW LIST2-$
- DEFW LEAVE
- LIST2 DEFW XLOOP
- DEFW LIST1-$
- DEFW CR
- DEFW SEMIS
- ;
- DEFB 85H ; INDEX
- DEFM 'INDE'
- DEFB 'X'+80H
- DEFW LIST-7
- INDEX DEFW DOCOL
- DEFW PAGE
- DEFW CR
- DEFW ONEP
- DEFW SWAP
- DEFW XDO
- INDE1 DEFW CR
- DEFW IDO
- DEFW LIT
- DEFW 3
- DEFW DOTR
- DEFW SPACE
- DEFW ZERO
- DEFW IDO
- DEFW DLINE
- DEFW QTERM
- DEFW ZBRAN
- DEFW INDE2-$
- DEFW LEAVE
- INDE2 DEFW XLOOP
- DEFW INDE1-$
- DEFW SEMIS
- ;
- DEFB 85H ; TRIAD
- DEFM 'TRIA'
- DEFB 'D'+80H
- DEFW INDEX-8
- TRIAD DEFW DOCOL
- DEFW PAGE
- DEFW LIT
- DEFW 3
- DEFW SLASH
- DEFW LIT
- DEFW 3
- DEFW STAR
- DEFW LIT
- DEFW 3
- DEFW OVER
- DEFW PLUS
- DEFW SWAP
- DEFW XDO
- TRIA1 DEFW CR
- DEFW IDO
- DEFW LIST
- DEFW QTERM
- DEFW ZBRAN
- DEFW TRIA2-$
- DEFW LEAVE
- TRIA2 DEFW XLOOP
- DEFW TRIA1-$
- DEFW CR
- DEFW SEMIS
- ;
- DEFB 84H ; .CPU
- DEFM '.CP'
- DEFB 'U'+80H
- DEFW TRIAD-8
- DOTCPU DEFW DOCOL
- DEFW BASE
- DEFW AT
- DEFW LIT
- DEFW 36
- DEFW BASE
- DEFW STORE
- DEFW LIT
- DEFW 22H
- DEFW PORIG
- DEFW TAT
- DEFW DDOT
- DEFW BASE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 0C9H ; /COMPILE/
- DEFM '/COMPILE'
- DEFB '/'+80H
- DEFW DOTCPU-7
- SLACOM DEFW DOCOL
- DEFW BCOMP
- DEFW SEMIS
- ;
- DEFB 84H ; PAGE
- DEFM 'PAG'
- DEFB 'E'+80H
- DEFW SLACOM-12
- PAGE DEFW $+2
- LD (SAVEBC),BC
- PUSH IX
- PUSH BC
- PUSH HL
- LD BC,1 ; TEXTLÄNGD
- LD HL,CLS ;PEKARE TILL TEXT
- CALL 0BH ;OUTSTR
- POP HL
- POP BC
- POP IX
- LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 0C2H ; LB
- DEFB 'L'
- DEFB 'B'+80H
- DEFW PAGE-7
- LB DEFW DOCOL
- DEFW LBRAC
- DEFW SEMIS
- ;
- DEFB 85H ; PR-ON
- DEFM 'PR-O'
- DEFB 'N'+80H
- DEFW LB-5
- PRON DEFW $+2
- LD HL,1
- LD (EPRINT),HL
- JP NEXT
- PRBLK DEFS 30
- ;
- DEFB 86H ; PR-OFF
- DEFM 'PR-OF'
- DEFB 'F'+80H
- DEFW PRON-8
- PROFF DEFW $+2
- LD HL,0
- LD (EPRINT),HL
- JP NEXT
- ;
- ;
- DEFB 87H ; CURADDR
- DEFM 'CURADD'
- DEFB 'R'+80H
- DEFW PROFF-9
- CURADD DEFW $+2
- LD (SAVEBC),BC
- POP DE ; Y
- POP BC ; X
- LD D,C
- ;
- ; BILDADRESSBER[KNING ABC 800
- ;
- PUSH DE
- LD A,(0FF54H) ; 40/80 TKN
- ;65364
- PUSH AF
- CP 80
- JR Z,TKN40
- LD A,E
- SRL A
- SRL A
- SRL A
- LD L,A
- ADD A,A
- ADD A,A
- ADD A,L
- ADD A,A
- ADD A,A
- ADD A,A
- LD L,A
- LD A,E
- AND 7
- SRL A
- ADD A,7CH
- LD H,A
- LD A,E
- AND 1
- RRCA
- ADD A,L
- LD L,A
- POP AF
- POP DE
- LD E,D
- LD D,0
- ADD HL,DE
- JR KLAR
- ;
- ; 40 TECKENS BERÄKNING
- ;
- TKN40 LD A,E
- ADD A,A
- ADD A,A
- ADD A,E
- ADD A,A
- LD L,A
- LD H,0
- ADD HL,HL
- ADD HL,HL
- ADD HL,HL
- LD A,H
- ADD A,120
- LD H,A
- POP AF
- POP DE
- LD E,D
- LD D,0
- ADD HL,DE
- ;
- ;
- KLAR PUSH HL ; LÄGG ADRESSEN PÅ STACKEN
- LD BC,(SAVEBC)
- JP NEXT
- ;
- DEFB 85H ; ?DISK
- DEFM '?DIS'
- DEFB 'K'+80H
- DEFW CURADD-10
- QDISK DEFW DOCOL
- DEFW DSKERR
- DEFW AT
- DEFW ZBRAN
- DEFW QDSK1-$
- DEFW CR
- DEFW ERNUM
- DEFW ERROR
- QDSK1 DEFW SEMIS
- ;
- DEFB 84H ; ERR#
- DEFM 'ERR'
- DEFB '#'+80H
- DEFW QDISK-8
- ERNUM DEFW $+2
- LD DE,8
- LD HL,DSKERR+2
- BIT 1,(HL)
- JR Z,DER1
- LD DE,12
- JR DEREND
- DER1 BIT 6,(HL)
- JR Z,DER2
- LD DE,10
- JR DEREND
- DER2 BIT 4,(HL)
- JR Z,DER3
- LD DE,11
- JR DEREND
- DER3 BIT 7,(HL)
- JR Z,DEREND
- LD DE,9
- DEREND EX DE,HL
- JP HPUSH
- ;
- DEFB 84H ; NEXT
- DEFM 'NEX'
- DEFB 'T'+80H
- DEFW ERNUM-7
- NEXTT DEFW DOCON
- DEFW NEXT
- ;
- DEFB 84H ; BECE
- DEFM 'BEC'
- DEFB 'E'+80H
- DEFW NEXTT-7
- BECE DEFW DOVAR
- SAVEBC DEFW 0
- ;
- RETSTK LD HL,(RPP)
- ADD HL,DE
- LD E,(HL)
- INC HL
- LD D,(HL)
- PUSH DE
- JP NEXT
- ;
- DEFB 82H ; IPRIME
- DEFB 'I'
- DEFB 39+80H
- DEFW BECE-7
- IPRIM DEFW $+2
- LD DE,2
- JP RETSTK
- ;
- DEFB 81H ; J
- DEFB 'J'+80H
- DEFW IPRIM-5
- JAY DEFW $+2
- LD DE,4
- JP RETSTK
- ;
- DEFB 82H ; JPRIME
- DEFB 'J'
- DEFB 39+80H
- DEFW JAY-4
- JPRIM DEFW $+2
- LD DE,6
- JP RETSTK
- ;
- DEFB 85H ; 2DROP
- DEFM '2DRO'
- DEFB 'P'+80H
- DEFW JPRIM-5
- TODROP DEFW $+2
- POP HL
- POP HL
- JP NEXT
- ;
- DEFB 85H ; 2SWAP
- DEFM '2SWA'
- DEFB 'P'+80H
- DEFW TODROP-8
- TOSWAP DEFW $+2
- POP DE
- POP HL
- EXX
- POP DE
- POP HL
- EXX
- PUSH HL
- PUSH DE
- EXX
- PUSH HL
- PUSH DE
- EXX
- JP NEXT
- ;
- DEFB 89H ; CCONSTANT
- DEFM 'CCONSTAN'
- DEFB 'T'+80H
- DEFW TOSWAP-8
- CCON DEFW DOCOL
- DEFW CREAT
- DEFW SMUDG
- DEFW CCOMM
- DEFW PSCOD
- DOCCON INC DE
- EX DE,HL
- LD L,(HL)
- LD H,0
- JP HPUSH
- ;
- DEFB 89H ; CVARIABLE
- DEFM 'CVARIABL'
- DEFB 'E'+80H
- DEFW CCON-12
- CVAR DEFW DOCOL
- DEFW CCON
- DEFW PSCOD
- DOCVAR INC DE
- PUSH DE
- JP NEXT
- ;
- DEFB 84H ; XCUR
- DEFM 'XCU'
- DEFB 'R'+80H
- DEFW CVAR-12
- XCUR DEFW DOCON
- DEFW KOL
- ;
- DEFB 84H ; YCUR
- DEFM 'YCU'
- DEFB 'R'+80H
- DEFW XCUR-7
- YCUR DEFW DOCON
- DEFW RAD
- ;
- DEFB 86H ; PRCODE
- DEFM 'PRCOD'
- DEFB 'E'+80H
- DEFW YCUR-7
- PRCODE DEFW DOCON
- DEFW NAMFLD
- ;
- DEFB 85H ; CLOCK
- DEFM 'CLOC'
- DEFB 'K'+80H
- DEFW PRCODE-9
- CLOCK DEFW DOCON
- DEFW 65525 ; 1/94 DELS SEKUND
- ;
- DEFB 89H ; TERMINAL!
- DEFM 'TERMINAL'
- DEFB '!'+80H
- DEFW CLOCK-8
- TERMST DEFW $+2
- LD A,0
- LD (TGBF),A
- JP NEXT
- ;
- DEFB 86H ; BINARY
- DEFM 'BINAR'
- DEFB 'Y'+80H
- DEFW TERMST-12
- BINARY DEFW DOCOL
- DEFW TWO
- DEFW BASE
- DEFW STORE
- DEFW SEMIS
- ;
- DEFB 82H ; 0>
- DEFB '0'
- DEFB '>'+80H
- DEFW BINARY-9
- ZGREAT DEFW $+2
- POP DE
- LD HL,0
- BIT 7,D
- JP NZ,HPUSH
- LD A,E
- OR D
- JP Z,HPUSH
- INC HL
- JP HPUSH
- ;
- DEFB 82H ; RB
- DEFB 'R'
- DEFB 'B'+80H
- DEFW ZGREAT-5
- RB DEFW DOCOL
- DEFW RBRAC
- DEFW SEMIS
- ;
- DEFB 81H ; H
- DEFB 'H'+80H
- DEFW RB-5
- HH DEFW DOUSE
- DEFB 12H
- ;
- DEFB 83H ; NOT
- DEFM 'NO'
- DEFB 'T'+80H
- DEFW HH-4
- NOTT DEFW ZEQU+2
- ;
- DEFB 85H ; OCTAL
- DEFM 'OCTA'
- DEFB 'L'+80H
- DEFW NOTT-6
- OCTAL DEFW DOCOL
- DEFW LIT
- DEFW 8
- DEFW BASE
- DEFW STORE
- DEFW SEMIS
- ;
- ; VEDIT FOR ABC80
- ;
- YXCUR DEFW $+2 ; YXCUR
- LD HL,RAD
- POP DE
- LD (HL),E
- ; INC HL ; FÖR ABC 80
- DEC HL ; FÖR ABC 800
- POP DE
- LD (HL),E
- JP NEXT
- ;
- DOTCUR DEFW DOCOL
- DEFW RNUM
- DEFW AT
- DEFW CSLL
- DEFW SLMOD
- DEFW TWOP
- DEFW SWAP
- DEFW THREE
- DEFW PLUS
- DEFW SWAP
- DEFW YXCUR
- DEFW SEMIS
- ;
- STCUR DEFW DOCOL ; !CUR
- DEFW ZERO
- DEFW MAX
- DEFW LIT
- DEFW CPLL*LPSCR-1
- DEFW MIN
- DEFW RNUM
- DEFW STORE
- DEFW SEMIS
- ;
- PCUR DEFW DOCOL ; +CUR
- DEFW RNUM
- DEFW AT
- DEFW PLUS
- DEFW STCUR
- DEFW SEMIS
- ;
- PDTCUR DEFW DOCOL ; +.CUR
- DEFW PCUR
- DEFW DOTCUR
- DEFW SEMIS
- ;
- PLIN DEFW DOCOL ; +LIN
- DEFW RNUM
- DEFW AT
- DEFW CSLL
- DEFW SLASH
- DEFW ONEP
- DEFW CSLL
- DEFW STAR
- DEFW STCUR
- DEFW SEMIS
- ;
- HOM DEFW DOCOL ; HOM
- DEFW ZERO
- DEFW RNUM
- DEFW STORE
- DEFW SEMIS
- ;
- LIMITS DEFW DOCOL
- DEFW LIT
- DEFW LPSCR
- DEFW ZERO
- DEFW XDO
- LIM1 DEFW CSLL
- DEFW THREE
- DEFW PLUS
- DEFW IDO
- DEFW TWOP
- DEFW YXCUR
- DEFW LIT
- DEFW 127
- DEFW PEMIT
- DEFW XLOOP
- DEFW LIM1-$
- DEFW SEMIS
- ;
- STBLK DEFW DOCOL ; !BLK
- DEFW SCR
- DEFW AT
- DEFW BLOCK
- DEFW RNUM
- DEFW AT
- DEFW PLUS
- DEFW CSTOR
- DEFW UPDAT
- DEFW ONE
- DEFW PDTCUR
- DEFW SEMIS
- ;
- DEFB 85H ; VEDIT
- DEFM 'VEDI'
- DEFB 'T'+80H
- DEFW OCTAL-8
- VEDIT DEFW DOCOL
- DEFW PAGE
- DEFW LIST
- DEFW LIMITS
- DEFW HOM
- DEFW DOTCUR
- VEDIT1 DEFW KEY
- DEFW DUP
- DEFW ZEQU
- DEFW ZBRAN
- DEFW VEDIT1+22-$
- DEFW DROP
- DEFW ZERO
- DEFW LIT
- DEFW LPSCR+2
- DEFW YXCUR
- DEFW SEMIS
- DEFW DUP ; VEDIT2
- DEFW LIT
- DEFW 8 ; <- LEFT
- DEFW EQUAL
- DEFW ZBRAN
- DEFW VEDIT3-$
- DEFW ONE
- DEFW MINUS
- DEFW PDTCUR
- DEFW DROP
- DEFW BRAN
- DEFW VEDIT1-$
- VEDIT3 DEFW DUP
- DEFW LIT
- DEFW 13 ; RETURN-KEY MEANS DOWN
- DEFW EQUAL
- DEFW ZBRAN
- DEFW VEDIT4-$
- DEFW CSLL
- DEFW PDTCUR
- DEFW DROP
- DEFW BRAN
- DEFW VEDIT1-$
- VEDIT4 DEFW DUP
- DEFW LIT
- DEFW 94 ; ^ MEANS UP
- DEFW EQUAL
- DEFW ZBRAN
- DEFW VEDIT5-$
- DEFW DROP
- DEFW CSLL
- DEFW MINUS
- DEFW PDTCUR
- DEFW BRAN
- DEFW VEDIT1-$
- VEDIT5 DEFW DUP
- DEFW LIT
- DEFW 9 ; -> RIGHT
- DEFW EQUAL
- DEFW ZBRAN
- DEFW VEDIT7-$
- DEFW DROP
- DEFW ONE
- DEFW PDTCUR
- DEFW BRAN
- DEFW VEDIT1-$
- VEDIT7 DEFW DUP
- DEFW DUP
- DEFW LIT
- DEFW 32
- DEFW LESS
- DEFW SWAP
- DEFW LIT
- DEFW 127
- DEFW GREAT
- DEFW PLUS
- DEFW ZBRAN
- DEFW VEDIT8-$
- DEFW DROP
- DEFW BRAN
- DEFW VEDIT1-$
- VEDIT8 DEFW DUP
- DEFW PEMIT
- DEFW STBLK
- DEFW BRAN
- DEFW VEDIT1-$
- ;
- DEFB 85H ; CLEAR
- DEFM 'CLEA'
- DEFB 'R'+80H
- DEFW VEDIT-8
- CLEAR DEFW DOCOL
- DEFW BLOCK
- DEFW LIT
- DEFW BPSCR
- DEFW BLANK
- DEFW SEMIS
- ;
- DEFB 84H ; TASK
- DEFM 'TAS'
- DEFB 'K'+80H
- DEFW CLEAR-8
- TASK DEFW DOCOL
- DEFW SEMIS
- ;
- CLS DEFB 12 ; FORMFEED FÖR ATT SLÄCKA SKÄRMEN
- ;
- INITDP DEFS EM-$
- END ORIG
Add Comment
Please, Sign In to add comment