A2osX/BASIC.FX/BASIC.S.txt

314 lines
7.3 KiB
Plaintext
Raw Normal View History

NEW
AUTO 3,1
.LIST OFF
2022-03-13 12:52:24 +00:00
.OP 65c02
.OR $2000
2022-03-13 12:52:24 +00:00
.TF BASIC.SYSTEM,TSYS
*--------------------------------------
.MA DEBUG
:1 bit $C000
bpl :1
sta $C010
.EM
2022-05-25 18:46:02 +00:00
*--------------------------------------
.INB inc/io.d2.i
2022-03-13 12:52:24 +00:00
*--------------------------------------
2022-04-03 11:55:03 +00:00
HIMEM .EQ $A000
2022-03-13 12:52:24 +00:00
LOWERCASE .EQ 1
*--------------------------------------
BS.E.RANGE .EQ $02
BS.E.NODEV .EQ $03
BS.E.WPROT .EQ $04
BS.E.ENDOFDATA .EQ $05
BS.E.PATHNFND6 .EQ $06
BS.E.PATHNFND7 .EQ $07
BS.E.IO .EQ $08
BS.E.DISKFULL .EQ $09
BS.E.LOCKED .EQ $0A
BS.E.INVOPT .EQ $0B
BS.E.NOBUFFER .EQ $0C
BS.E.MISMATCH .EQ $0D
BS.E.TOOLARGE .EQ $0E
BS.E.NODIRECT .EQ $0F
BS.E.SYNTAX .EQ $10
BS.E.DIRFULL .EQ $11
BS.E.FNOTOPEN .EQ $12
BS.E.DUPFILE .EQ $13
BS.E.FBUSTY .EQ $14
BS.E.FSTILLOPEN .EQ $15
*--------------------------------------
2022-05-25 18:46:02 +00:00
CMDBITS0.PFIX .EQ $80 Prefix needs fetching, pathname optional
CMDBITS0.SLOT .EQ $40 No parameters to be processed
CMDBITS0.RRUN .EQ $20 Command only valid during program
CMDBITS0.FNOPT .EQ $10 Filename is optional
CMDBITS0.CRFLG .EQ $08 CREATE allowed
CMDBITS0.T .EQ $04 File type
CMDBITS0.FN2 .EQ $02 Filename '2' for RENAME
CMDBITS0.FN1 .EQ $01 Filename expected
CMDBITS1.A .EQ $80 Address
CMDBITS1.B .EQ $40 Byte
CMDBITS1.E .EQ $20 End address
CMDBITS1.L .EQ $10 Length
CMDBITS1.LINE .EQ $08 '@' line number
CMDBITS1.SD .EQ $04 Slot and drive numbers
CMDBITS1.F .EQ $02 Field
CMDBITS1.R .EQ $01 Record
CMDBITS1.V .EQ $00 Volume number ignored
*--------------------------------------
ZPPtr1 .EQ 0
ZPPtr2 .EQ 2
ZPInBufPtr .EQ 4
ZPOutBufPtr .EQ 6
ZPnCnt .EQ 8
ZPInMask .EQ 10
ZPBLOfsLBits .EQ 11
ZPBLOfsHBits .EQ 12
ZPBLLenBits .EQ 13
bRAMFlag .EQ 14
ZPCode .EQ 15
ZP.WNDLFT .EQ $20
ZP.WNDWDT .EQ $21
ZP.WNDTOP .EQ $22
ZP.WNDBOT .EQ $23
ZP.CH .EQ $24
ZP.CV .EQ $25
ZP.BASL .EQ $28
ZP.BASH .EQ $29
ZP.PROMPT .EQ $33
ZP.CSW .EQ $36
ZP.KSW .EQ $38
ZP.PCL .EQ $3A
ZP.PCH .EQ $3B
ZP.A1L .EQ $3C
ZP.A1H .EQ $3D
ZP.A2L .EQ $3E
ZP.A2H .EQ $3F
2022-05-25 18:46:02 +00:00
ZP.A4L .EQ $40
ZP.A4H .EQ $41
ZP.CMD .EQ $42
ZP.UNITNUM .EQ $43
ZP.BUFPTR .EQ $44
ZP.BLKNUM .EQ $46
AS.LINNUM .EQ $50
AS.PGRMSTART .EQ $67
AS.VARSTART .EQ $69
AS.ARRAYSTART .EQ $6B
AS.ARRAYEND .EQ $6D
AS.STRINGSTART .EQ $6F
AS.STRINGPTR .EQ $71
AS.HIMEM .EQ $73
AS.CURLINE .EQ $75
AS.LOWTR .EQ $9B
AS.PGRMEND .EQ $AF
AS.TXTPTR .EQ $B8
AS.ERRFLG .EQ $D8
AS.ERRNUM .EQ $DE
AS.TRCFLG .EQ $F2
AS.REMSTK .EQ $F8
*--------------------------------------
2022-05-25 18:46:02 +00:00
ZPXPtr1 .EQ 0
ZPXPtr2 .EQ 2
*--------------------------------------
IO.LINEBUF .EQ $200
*--------------------------------------
DIRENTBUF .EQ $259
DIRENTBUF.STNL .EQ $25D
DIRENTBUF.TYPE .EQ $269
DIRENTBUF.UBLK .EQ $26C
DIRENTBUF.EOF .EQ $26E
DIRENTBUF.ACCESS .EQ $277
DIRENTBUF.AUXT .EQ $278
MLI.PATHBUF .EQ $280
*--------------------------------------
2022-03-27 12:59:32 +00:00
AUX.RAMSIG .EQ $3D0 FFFEF3+"RAM"
*--------------------------------------
DOS.WARMSTART .EQ $03D0
DOS.COLDSTART .EQ $03D3
DOS.FILEMGR .EQ $03D6
DOS.RWTS .EQ $03D9
DOS.FILEMGRPARM .EQ $03DC
DOS.RWTSPARM .EQ $03E3
DOS.RECONNECT .EQ $03DA
DOS.JMPBRKVECT .EQ $03EF
MON.AMPERSANDJMP .EQ $03F5
MON.USRJMP .EQ $03F8
MON.NMIJMP .EQ $03FB
MON.IRQVECT .EQ $03FE
MON.BRKVECT .EQ $03F0
MON.POWERUP .EQ $03F2
MON.POWERUPBYTE .EQ $03F4
*--------------------------------------
MLI.MAXPATH .EQ 64
MLI.C.ALLOCIRQ .EQ $40
MLI.C.DEALLOCIRQ .EQ $41
MLI.C.ATALK .EQ $42
MLI.C.QUIT .EQ $65
MLI.C.READBLOCK .EQ $80
MLI.C.WRITEBLOCK .EQ $81
MLI.C.GETTIME .EQ $82
MLI.C.CREATE .EQ $C0
MLI.C.DESTROY .EQ $C1
MLI.C.RENAME .EQ $C2
MLI.C.SETFILEINFO .EQ $C3
MLI.C.GETFILEINFO .EQ $C4
MLI.C.ONLINE .EQ $C5
MLI.C.SETPREFIX .EQ $C6
MLI.C.GETPREFIX .EQ $C7
MLI.C.OPEN .EQ $C8
MLI.C.NEWLINE .EQ $C9
MLI.C.READ .EQ $CA
MLI.C.WRITE .EQ $CB
MLI.C.CLOSE .EQ $CC
MLI.C.FLUSH .EQ $CD
MLI.C.SETMARK .EQ $CE
MLI.C.GETMARK .EQ $CF
MLI.C.SETEOF .EQ $D0
MLI.C.GETEOF .EQ $D1
MLI.C.SETBUF .EQ $D2
MLI.C.GETBUF .EQ $D3
*--------------------------------------
MLI .EQ $BF00
2022-03-27 12:59:32 +00:00
MLI.DEVPTRS .EQ $BF10
MLI.DEVPTRS3D2 .EQ $BF26
MLI.DEVNUM .EQ $BF30
MLI.DEVCNT .EQ $BF31
MLI.DEVLST .EQ $BF32
MLI.MEMTABL .EQ $BF58
2022-05-25 18:46:02 +00:00
MLI.DATETIME .EQ $BF90
MLI.LEVEL .EQ $BF94
MLI.MACHID .EQ $BF98
MLI.SLTBYT .EQ $BF99
MLI.PFIXPTR .EQ $BF9A
MLI.MLIACTV .EQ $BF9B
MLI.IVERSION .EQ $BFFD
*--------------------------------------
2022-03-27 12:59:32 +00:00
IO.KBD .EQ $C000 R
IO.CLR80STORE .EQ $C000 W
IO.SET80STORE .EQ $C001 W
IO.CLRREADAUX .EQ $C002 W
IO.SETREADAUX .EQ $C003 W
IO.CLRWRITEAUX .EQ $C004 W
IO.SETWRITEAUX .EQ $C005 W
IO.CLRALTZP .EQ $C008 W
IO.SETALTZP .EQ $C009 W
IO.CLR80DISP .EQ $C00C W
IO.SET80DISP .EQ $C00D W
IO.KSTROBE .EQ $C010 W
IO.RROMBNK2 .EQ $C082 R
IO.RRAMWRAMBNK2 .EQ $C083 RR
IO.RROMBNK1 .EQ $C08A R
IO.RRAMWRAMBNK1 .EQ $C08B RR
*--------------------------------------
AS.RESTART .EQ $D43C
AS.RESTART1 .EQ $D43F
AS.FINDLINE .EQ $D61A
AS.CLEAR1 .EQ $D665
AS.NEXTSTMT .EQ $D7D2
AS.EXECSTMT .EQ $D820
AS.BITERRFLG .EQ $D865
AS.NORMAL .EQ $F273
AS.COLDBOOT .EQ $E000
AS.INTPRINTAX .EQ $ED24
*--------------------------------------
MON.BREAKV .EQ $FA59
MON.INIT .EQ $FB2F
2022-03-27 12:59:32 +00:00
MON.HOME .EQ $FC58
MON.CLREOL .EQ $FC9C
MON.RDKEY .EQ $FD0C
MON.KEYIN0 .EQ $FD10
MON.KEYIN .EQ $FD1B
MON.GETLN .EQ $FD6A
MON.CROUT .EQ $FD8E
MON.COUT .EQ $FDED
MON.COUT1 .EQ $FDF0
MON.IIGSID .EQ $FE1F
MON.SETINV .EQ $FE80
MON.SETNORM .EQ $FE84
2022-03-27 12:59:32 +00:00
MON.SETKBD .EQ $FE89
MON.SETVID .EQ $FE93
MON.ENTERMON .EQ $FF69
*--------------------------------------
.INB usr/src/basic.fx/basic.s.ldr
2022-05-25 18:46:02 +00:00
*--------------------------------------
X.Unpak.XatYA sty ZPOutBufPtr
sta ZPOutBufPtr+1
lda PAKME.Table,x
sta ZPInBufPtr
lda PAKME.Table+1,x
sta ZPInBufPtr+1
.INB usr/src/shared/x.unpak.s
*--------------------------------------
PAKME.Table
PAKME.MAIN .DA MAIN.PAK
PAKME.GP .DA GP.PAK
PAKME.AUX .DA AUX.PAK
MAIN.PAK .DA #0
.DA MAIN.LEN
LDR.MAIN.SRC .PH HIMEM
2022-03-27 12:59:32 +00:00
LDR.MAIN.DST .EQ *
.INB usr/src/basic.fx/basic.s.a
.INB usr/src/basic.fx/basic.s.b
.INB usr/src/basic.fx/basic.s.c
.INB usr/src/basic.fx/basic.s.d
2022-05-25 18:46:02 +00:00
MAIN.LEN .EQ *-LDR.MAIN.DST
.EP
GP.PAK .DA #0
.DA GP.LEN
2022-03-27 12:59:32 +00:00
LDR.GP.SRC .PH $BE00
LDR.GP.DST .EQ *
.INB usr/src/basic.fx/basic.s.gp
2022-05-25 18:46:02 +00:00
GP.LEN .EQ *-LDR.GP.DST
.EP
AUX.PAK .DA #0
.DA AUX.LEN
LDR.AUX.SRC .EQ *
LDR.AUX.DST .EQ $E000
BB.PRODOS .EQ $E000
.INB usr/src/shared/x.bb.prodos.s
BB.SOS .EQ $E200
.INB usr/src/shared/x.bb.sos.s
BB.FX2 .EQ $E400
.INB usr/src/shared/x.bb.fx2.s
X.TRkFMT.Z .EQ $10
.PH $E800
.INB usr/src/shared/x.trkfmt.s
.BS $E900-*
.LIST OFF
.INB usr/src/basic.fx/basic.s.xf
.INB usr/src/basic.fx/basic.s.xm
2022-05-25 18:46:02 +00:00
.INB usr/src/basic.fx/basic.s.x
.EP
2022-05-25 18:46:02 +00:00
AUX.LEN .EQ *-LDR.AUX.SRC
*--------------------------------------
.AS "PAKME" TAG
.DA $2000 BIN ORG
.DA #3 Chunk Count
.DA PAKME.Table Chunks
*--------------------------------------
MAN
SAVE usr/src/basic.fx/basic.s
ASM