2021-12-02 21:28:26 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF bin/cc
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
|
|
|
|
.INB inc/mli.i
|
|
|
|
|
.INB inc/mli.e.i
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
FILES.MAX .EQ 4
|
2022-01-30 21:47:08 +00:00
|
|
|
|
SCOPE.MAX .EQ 16
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SYM.T .EQ 0
|
|
|
|
|
SYM.T.VOID .EQ 1
|
|
|
|
|
SYM.T.UCHAR .EQ 2
|
|
|
|
|
SYM.T.SCHAR .EQ 3
|
|
|
|
|
SYM.T.UINT .EQ 4
|
|
|
|
|
SYM.T.SINT .EQ 5
|
|
|
|
|
SYM.T.ULONG .EQ 6
|
|
|
|
|
SYM.T.SLONG .EQ 7
|
|
|
|
|
SYM.T.FLOAT .EQ 8
|
|
|
|
|
SYM.T.VARIADIC .EQ $FF
|
|
|
|
|
SYM.Q .EQ 1
|
|
|
|
|
SYM.Q.POINTER .EQ %01000000
|
|
|
|
|
SYM.Q.PPOINTER .EQ %10000000
|
|
|
|
|
SYM.Q.PPPOINTER .EQ %11000000
|
|
|
|
|
SYM.Q.ARRAY .EQ %00010000
|
|
|
|
|
SYM.Q.AARRAY .EQ %00100000
|
|
|
|
|
SYM.Q.AAARRAY .EQ %00110000
|
|
|
|
|
SYM.Q.CONST .EQ %00001000
|
|
|
|
|
SYM.Q.VOLATILE .EQ %00000100
|
|
|
|
|
SYM.Q.FUNC .EQ %00000010
|
|
|
|
|
SYM.Q.FASTCALL .EQ %00000001
|
|
|
|
|
SYM.SC .EQ 2
|
|
|
|
|
SYM.SC.STATIC .EQ 0
|
|
|
|
|
SYM.SC.AUTO .EQ 2
|
|
|
|
|
SYM.SC.REGISTER .EQ 4
|
|
|
|
|
SYM.SC.EXTERN .EQ 6
|
|
|
|
|
SYM.SC.TYPEDEF .EQ 8
|
|
|
|
|
*
|
|
|
|
|
SYM.SizeOf .EQ 4
|
|
|
|
|
SYM.Addr .EQ 6
|
|
|
|
|
* .EQ 8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*
|
2022-01-30 21:47:08 +00:00
|
|
|
|
SYM.Def .EQ 10
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Zero Page Segment, up to 32 bytes
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPCCCode .BS 2
|
|
|
|
|
ZPCCConst .BS 2
|
|
|
|
|
ZPCCData .BS 2
|
|
|
|
|
ZPCCStack .BS 2
|
|
|
|
|
|
|
|
|
|
ZPLineBufPtr .BS 2
|
2022-01-30 21:47:08 +00:00
|
|
|
|
ZPLookupPtr .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CStackPtr .BS 1
|
|
|
|
|
LocalPtr .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
ScopePtr .BS 1
|
|
|
|
|
ScopenCnt .BS 1
|
|
|
|
|
|
|
|
|
|
ZPSymID .BS 2
|
|
|
|
|
hSymScope .BS 1
|
|
|
|
|
hSymBuf .BS 1
|
|
|
|
|
ZPSymSize .BS 2
|
|
|
|
|
ZPSymBufPtr .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
|
|
|
|
ZPPtr3 .BS 2
|
|
|
|
|
ArgIndex .BS 1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
hDefineBuf .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
ZS.END .ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA #0 S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA DS.END-DS.START Data Size
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DA #256 Stack Size
|
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.MSG.GREETINGS .DA MSG.GREETINGS
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.COMPILING .DA MSG.COMPILING
|
|
|
|
|
L.MSG.DEBUG .DA MSG.DEBUG
|
|
|
|
|
L.MSG.TRACE .DA MSG.TRACE
|
2022-01-30 21:47:08 +00:00
|
|
|
|
L.MSG.RTSTK .DA MSG.RTSTK
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.MSG.ERROR .DA MSG.ERROR
|
2022-01-30 21:47:08 +00:00
|
|
|
|
L.MSG.NOMAIN .DA MSG.NOMAIN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.ENV.INCLUDE .DA ENV.INCLUDE
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.CC.PREOPS .DA CC.PREOPS
|
2022-01-30 21:47:08 +00:00
|
|
|
|
J.CC.PREOPS .DA CC.EXP.GetRef
|
|
|
|
|
.DA CC.EXP.GetDeref
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.CC.POSTOPS .DA CC.POSTOPS
|
|
|
|
|
L.CC.AOPS .DA CC.AOPS
|
|
|
|
|
L.CC.BOPS .DA CC.BOPS
|
|
|
|
|
J.CC.bBOPS .DA CC.BOPS.bMUL
|
|
|
|
|
.DA CC.BOPS.bDIV
|
|
|
|
|
.DA CC.BOPS.bMOD
|
|
|
|
|
.DA CC.BOPS.ADD
|
|
|
|
|
.DA CC.BOPS.SUB
|
|
|
|
|
.DA CC.BOPS.SHL
|
|
|
|
|
.DA CC.BOPS.SHR
|
|
|
|
|
.DA CC.BOPS.L
|
|
|
|
|
.DA CC.BOPS.LE
|
|
|
|
|
.DA CC.BOPS.G
|
|
|
|
|
.DA CC.BOPS.GE
|
|
|
|
|
.DA CC.BOPS.EQ
|
|
|
|
|
.DA CC.BOPS.NE
|
|
|
|
|
.DA CC.BOPS.AND
|
|
|
|
|
.DA CC.BOPS.OR
|
|
|
|
|
.DA CC.BOPS.EOR
|
|
|
|
|
.DA CC.BOPS.LAND
|
|
|
|
|
.DA CC.BOPS.LOR
|
|
|
|
|
J.CC.cBOPS .DA CC.BOPS.cMUL
|
|
|
|
|
.DA CC.BOPS.cDIV
|
|
|
|
|
.DA CC.BOPS.cMOD
|
|
|
|
|
.DA CC.BOPS.ADD
|
|
|
|
|
.DA CC.BOPS.SUB
|
|
|
|
|
.DA CC.BOPS.SHL
|
|
|
|
|
.DA CC.BOPS.SHR
|
|
|
|
|
.DA CC.BOPS.L
|
|
|
|
|
.DA CC.BOPS.LE
|
|
|
|
|
.DA CC.BOPS.G
|
|
|
|
|
.DA CC.BOPS.GE
|
|
|
|
|
.DA CC.BOPS.EQ
|
|
|
|
|
.DA CC.BOPS.NE
|
|
|
|
|
.DA CC.BOPS.AND
|
|
|
|
|
.DA CC.BOPS.OR
|
|
|
|
|
.DA CC.BOPS.EOR
|
|
|
|
|
.DA CC.BOPS.LAND
|
|
|
|
|
.DA CC.BOPS.LOR
|
|
|
|
|
L.CC.DIRS .DA CC.DIRS
|
|
|
|
|
L.CC.KW .DA CC.KW
|
2022-02-04 14:57:17 +00:00
|
|
|
|
L.CC.SCSPEC .DA CC.SCSPEC
|
2022-01-30 21:47:08 +00:00
|
|
|
|
L.CC.TYPEQUAL .DA CC.TYPEQUAL
|
|
|
|
|
L.CC.TYPESPEC .DA CC.TYPESPEC
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.CC.TYPES .DA CC.TYPES
|
|
|
|
|
L.CC.FTYPES .DA CC.FTYPES
|
|
|
|
|
J.CC.DIRS .DA CC.DIR.DEFINE
|
|
|
|
|
.DA CC.DIR.INCLUDE
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
J.CC.KW .DA CC.KW.IF
|
|
|
|
|
.DA CC.KW.WHILE
|
|
|
|
|
.DA CC.KW.ELSE
|
|
|
|
|
.DA CC.KW.DO
|
|
|
|
|
.DA CC.KW.FOR
|
|
|
|
|
.DA CC.KW.SWITCH
|
|
|
|
|
.DA CC.KW.CASE
|
|
|
|
|
.DA CC.KW.BREAK
|
|
|
|
|
.DA CC.KW.CONTINUE
|
|
|
|
|
.DA CC.KW.RETURN
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DA CC.KW.SIZEOF
|
|
|
|
|
.DA CC.KW.STRUCT
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
J.CC.KW.END .DA CC.KW.IF.END
|
|
|
|
|
.DA CC.KW.WHILE.END
|
|
|
|
|
.DA CC.KW.ELSE.END
|
|
|
|
|
.DA CC.KW.DO.END
|
|
|
|
|
.DA CC.KW.FOR.END
|
|
|
|
|
*--------------------------------------
|
2022-02-04 14:57:17 +00:00
|
|
|
|
J.CC.SCSPEC .DA CC.SCSPEC.AUTO
|
|
|
|
|
.DA CC.SCSPEC.REGISTER
|
|
|
|
|
.DA CC.SCSPEC.STATIC
|
|
|
|
|
.DA CC.SCSPEC.EXTERN
|
|
|
|
|
.DA CC.SCSPEC.TYPEDEF
|
2022-01-30 21:47:08 +00:00
|
|
|
|
J.CC.TYPEQUAL .DA CC.TYPE.CONST
|
|
|
|
|
.DA CC.TYPE.VOLATILE
|
|
|
|
|
J.CC.TYPESPEC .DA CC.TYPE.SIGNED
|
|
|
|
|
.DA CC.TYPE.UNSIGNED
|
|
|
|
|
.DA CC.TYPE.SHORT
|
|
|
|
|
J.CC.TYPES .DA CC.TYPE.VOID
|
|
|
|
|
.DA CC.TYPE.CHAR
|
|
|
|
|
.DA CC.TYPE.INT
|
|
|
|
|
.DA CC.TYPE.LONG
|
|
|
|
|
.DA CC.TYPE.FLOAT
|
|
|
|
|
J.CC.UTYPES .DA CC.TYPE.UCHAR
|
|
|
|
|
.DA CC.TYPE.UINT
|
|
|
|
|
.DA CC.TYPE.ULONG
|
|
|
|
|
J.CC.STYPES .DA CC.TYPE.SCHAR
|
|
|
|
|
.DA CC.TYPE.SINT
|
|
|
|
|
.DA CC.TYPE.SLONG
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.CC.MAIN .DA CC.MAIN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.CC.LIBC .DA CC.LIBC
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Called once at process creation
|
|
|
|
|
* Put code for loading LIB here
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT clc
|
|
|
|
|
CS.INIT.RTS rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Called until exit with CS
|
|
|
|
|
* if RUN exits with CC, RN entered again
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN >PUSHW L.MSG.GREETINGS
|
|
|
|
|
>PUSHW A2osX.KVER
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
bcs CS.INIT.RTS
|
|
|
|
|
|
|
|
|
|
lda #hFilePtr
|
|
|
|
|
>STA.G hFilePtr
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #LineCntPtr
|
|
|
|
|
>STA.G LineCntPtr
|
|
|
|
|
|
|
|
|
|
>LDYAI 256
|
|
|
|
|
>SYSCALL GetMem
|
|
|
|
|
bcs CS.INIT.RTS
|
|
|
|
|
|
|
|
|
|
>STYA.G LineBufPtr
|
|
|
|
|
txa
|
|
|
|
|
>STA.G hLineBuf
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.ARGS
|
|
|
|
|
bcs CS.INIT.RTS
|
|
|
|
|
|
|
|
|
|
jsr CC.Init
|
|
|
|
|
bcs CS.INIT.RTS
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CS.RUN.LOOP jsr CC.CompileFile
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
cmp #MLI.E.EOF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .9
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
jsr CS.RUN.FClose
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne CS.RUN.LOOP
|
2022-01-30 21:47:08 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
jsr CC.MainExec
|
|
|
|
|
bcc .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>LDYA L.MSG.NOMAIN
|
|
|
|
|
>SYSCALL puts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
.8 lda #0 Exit Code = Success
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 pha
|
|
|
|
|
jsr PrintErrorMsg
|
|
|
|
|
pla
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.ARGS inc ArgIndex
|
|
|
|
|
|
|
|
|
|
lda ArgIndex
|
|
|
|
|
>SYSCALL ArgV
|
|
|
|
|
bcs .7
|
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
ldx #OptionVars-OptionList-1
|
|
|
|
|
|
|
|
|
|
.1 cmp OptionList,x
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
bra .90
|
|
|
|
|
|
|
|
|
|
.2 ldy OptionVars,x
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra CS.RUN.ARGS
|
|
|
|
|
|
|
|
|
|
.4 >LDA.G hFilePtr
|
|
|
|
|
cmp #hFilePtr
|
|
|
|
|
bne .90
|
|
|
|
|
|
|
|
|
|
>LDYA ZPPtr1
|
|
|
|
|
jsr CS.RUN.FOpen
|
|
|
|
|
bcc CS.RUN.ARGS
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.7 >LDA.G hFilePtr
|
|
|
|
|
cmp #hFilePtr
|
|
|
|
|
beq .90
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
|
|
|
|
|
.90 >PUSHW L.MSG.USAGE
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
|
|
|
|
|
lda #E.SYN
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.FOpen >PUSHYA
|
|
|
|
|
>PUSHBI O.RDONLY
|
|
|
|
|
>PUSHBI S.FI.T.TXT
|
|
|
|
|
>PUSHWZ Aux type
|
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
>LDA.G hFilePtr
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
tay
|
|
|
|
|
txa
|
|
|
|
|
sta (pData),y
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDA.G LineCntPtr
|
|
|
|
|
inc
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
tay
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.FGetS >LDYA.G LineBufPtr
|
|
|
|
|
>STYA ZPLineBufPtr
|
|
|
|
|
|
|
|
|
|
>LDA.G LineCntPtr
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bne .1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.1 >LDA.G hFilePtr
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHWI 255
|
|
|
|
|
>SYSCALL FGetS
|
2022-01-30 21:47:08 +00:00
|
|
|
|
bcs .9
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>LDA.G bTrace
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
jsr PrintTraceMsg
|
|
|
|
|
|
|
|
|
|
.8
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.FClose >LDA.G hFilePtr
|
|
|
|
|
cmp #hFilePtr
|
|
|
|
|
beq .8
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
|
|
|
|
|
>SYSCALL FClose
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDA.G hFilePtr
|
|
|
|
|
dec
|
|
|
|
|
sta (pData),y
|
|
|
|
|
cmp #hFilePtr
|
|
|
|
|
beq .8
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDA.G LineCntPtr
|
|
|
|
|
dec
|
|
|
|
|
dec
|
|
|
|
|
sta (pData),y NZ
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.DOEVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.QUIT jsr CC.Quit
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>LDA.G hLineBuf
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
>SYSCALL FreeMem
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PrintTraceMsg ldy #S.PS.hStdErr
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.TRACE
|
|
|
|
|
|
|
|
|
|
>LDA.G LineCntPtr
|
|
|
|
|
inc
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHW.G LineBufPtr
|
|
|
|
|
>PUSHBI 4
|
|
|
|
|
>SYSCALL FPrintF
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PrintDebugMsg >PUSHW L.MSG.DEBUG
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPCCCode
|
|
|
|
|
>PUSHW ZPCCConst
|
|
|
|
|
>PUSHW ZPCCData
|
|
|
|
|
|
|
|
|
|
lda pStack
|
|
|
|
|
clc
|
|
|
|
|
adc #8
|
|
|
|
|
pha
|
|
|
|
|
lda pStack+1
|
|
|
|
|
adc #0
|
|
|
|
|
>PUSHA
|
|
|
|
|
pla
|
|
|
|
|
>PUSHA
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
|
|
|
|
>PUSHB LocalPtr
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPCCStack
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>PUSHB CStackPtr
|
|
|
|
|
tay
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
lda (ZPCCStack),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPCCStack),y
|
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
.1 >PUSHYA
|
|
|
|
|
|
|
|
|
|
>PUSHBI 14
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>SYSCALL PrintF
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>DEBUGOA
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PrintRTStackTrace
|
|
|
|
|
pha
|
|
|
|
|
phx
|
|
|
|
|
phy
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>PUSHW L.MSG.RTSTK
|
|
|
|
|
>PUSHW pBase
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPPtr1
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
>PUSHB (ZPPtr1),y
|
|
|
|
|
>PUSHB (ZPPtr1)
|
|
|
|
|
|
|
|
|
|
lda pStack
|
|
|
|
|
clc
|
|
|
|
|
adc #8
|
|
|
|
|
pha
|
|
|
|
|
lda pStack+1
|
|
|
|
|
adc #0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHA
|
2022-01-30 21:47:08 +00:00
|
|
|
|
pla
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PUSHA
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
|
|
|
|
>PUSHBI 8
|
|
|
|
|
>SYSCALL PrintF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
ply
|
|
|
|
|
plx
|
|
|
|
|
pla
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PrintErrorMsg lda hDefineBuf
|
2021-12-02 21:28:26 +00:00
|
|
|
|
beq .10
|
|
|
|
|
|
|
|
|
|
>LDYA.G CC.SaveDefine
|
|
|
|
|
>STYA ZPLineBufPtr
|
|
|
|
|
|
|
|
|
|
.10 >LDA.G bTrace
|
|
|
|
|
bmi .1
|
|
|
|
|
|
|
|
|
|
jsr PrintTraceMsg
|
|
|
|
|
|
|
|
|
|
.1 lda ZPLineBufPtr
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
>SBC.G LineBufPtr
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
>LDYA.G LineBufPtr
|
|
|
|
|
>STYA ZPLineBufPtr
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
lda #'-'
|
|
|
|
|
|
|
|
|
|
.2 sta (ZPLineBufPtr),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
|
|
|
|
|
.3 sta (ZPLineBufPtr),y
|
|
|
|
|
|
|
|
|
|
.8 ldy #S.PS.hStdErr
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
>PUSHW L.MSG.ERROR
|
|
|
|
|
>PUSHW ZPLineBufPtr
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL FPrintF
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB usr/src/bin/cc.s.code
|
|
|
|
|
.INB usr/src/bin/cc.s.core
|
|
|
|
|
.INB usr/src/bin/cc.s.dir
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.decl
|
|
|
|
|
.INB usr/src/bin/cc.s.stmt
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.kw
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.type
|
|
|
|
|
.INB usr/src/bin/cc.s.f
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.exp
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.sym
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.INB usr/src/bin/cc.s.exec
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.DEBUG
|
|
|
|
|
jsr PrintRTStackTrace
|
|
|
|
|
>DEBUG
|
|
|
|
|
PCC.DEBUG.L .EQ *-PCC.DEBUG
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.ENTER
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
|
|
|
|
|
ldx pBase
|
|
|
|
|
phx
|
|
|
|
|
clc
|
|
|
|
|
adc pStack A = Local Size
|
|
|
|
|
sta pBase
|
|
|
|
|
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
|
|
|
|
PCC.ENTER.L .EQ *-PCC.ENTER
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.LEAVE
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
|
|
|
|
|
lda pBase
|
|
|
|
|
sta pStack
|
|
|
|
|
pla
|
|
|
|
|
sta pBase
|
|
|
|
|
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
PCC.LEAVE.L .EQ *-PCC.LEAVE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.ADDLOCAL
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
clc
|
|
|
|
|
adc pStack
|
|
|
|
|
sta pStack
|
|
|
|
|
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
|
|
|
|
PCC.ADDLOCAL.L .EQ *-PCC.ADDLOCAL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.GETLOCAL clc
|
|
|
|
|
adc pBase
|
|
|
|
|
tay
|
|
|
|
|
lda pBase+1
|
|
|
|
|
|
|
|
|
|
PCC.GETLOCAL.L .EQ *-PCC.GETLOCAL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.SETRETVALUE ldy #0
|
|
|
|
|
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
|
|
|
|
.1 >PULLA
|
|
|
|
|
sta (pBase),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
PCC.SETRETVALUE.L .EQ *-PCC.SETRETVALUE
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.PushXFromYA >STYA ZPPtr1
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
txa
|
|
|
|
|
dec
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
PCC.PushXFromYA.L .EQ *-PCC.PushXFromYA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.PopXToYA >STYA ZPPtr1
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.1 >PULLA
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
PCC.PopXToYA.L .EQ *-PCC.PopXToYA
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.SetXToYA >STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
* jsr PrintRTStackTrace
|
|
|
|
|
* >DEBUG
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.1 lda (pStack),y
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
PCC.SetXToYA.L .EQ *-PCC.SetXToYA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Initialized DATA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MSG.GREETINGS .AZ "\r\nA2osX C Compiler %d.%d\r\n\r\n"
|
|
|
|
|
MSG.USAGE .AS "Usage : CC <option> srcfile\r\n"
|
|
|
|
|
.AS " -D : Debug Mode\r\n"
|
|
|
|
|
.AS " -T : Trace On"
|
|
|
|
|
.AZ "\r\n"
|
|
|
|
|
MSG.COMPILING .AZ "***Compiling : %s...\r\n"
|
|
|
|
|
MSG.DEBUG .AZ "***pCode=%H, pConst=%H, pData=%H, pStack=%H, LSP=%h, CSP=%H:%h>%h:%h\r\n"
|
|
|
|
|
MSG.TRACE .AZ "%5D> %s\r\n"
|
|
|
|
|
MSG.RTSTK .AZ "<pBase=%H, pVar=%H, (pVar)=%H, pStack=%H>\r\n"
|
|
|
|
|
MSG.ERROR .AZ " %s^\r\n"
|
|
|
|
|
MSG.NOMAIN .AZ "***No 'main()' function defined."
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
ENV.INCLUDE .AZ "INCLUDE"
|
|
|
|
|
ENV.LIB .AZ "LIB"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
OptionList .AS "DdTt"
|
|
|
|
|
OptionVars .DA #bDebug,#bDebug,#bTrace,#bTrace
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.SLEEP >SLEEP
|
|
|
|
|
PCC.SLEEP.L .EQ *-PCC.SLEEP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
*PCC.HEADER cld
|
|
|
|
|
* jmp (.1,x)
|
|
|
|
|
* .DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
* .DA #1 BIN Layout Version 1
|
|
|
|
|
* .DA #0 S.PS.F.EVENT
|
|
|
|
|
* .DA #0
|
|
|
|
|
* .DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
* .DA DS.END-DS.START Data Size
|
|
|
|
|
* .DA #256 Stack Size
|
|
|
|
|
* .DA #ZS.END-ZS.START Zero Page Size
|
|
|
|
|
* .DA 0
|
|
|
|
|
*.1 .DA CS.INIT
|
|
|
|
|
* .DA CS.RUN
|
|
|
|
|
* .DA CS.DOEVENT
|
|
|
|
|
* .DA CS.QUIT
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
PCC.Test0X lda #0
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 ora (pStack)
|
|
|
|
|
inc pStack
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tay
|
|
|
|
|
.2 bne .2+5
|
|
|
|
|
.HS 4C JMP abs
|
|
|
|
|
|
|
|
|
|
PCC.Test0X.L .EQ *-PCC.Test0X
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
PCC.SETpBASEp1 lda pBase+1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
PCC.SETpBASEp1.L .EQ *-PCC.SETpBASEp1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.SETpBASEpA clc
|
|
|
|
|
adc pBase
|
|
|
|
|
sta ZPPtr1
|
|
|
|
|
ldy #1
|
|
|
|
|
PCC.SETpBASEpA.L .EQ *-PCC.SETpBASEpA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.Deref >PUSHB (ZPPtr1),y
|
|
|
|
|
>PUSHB (ZPPtr1)
|
|
|
|
|
PCC.Deref.L .EQ *-PCC.Deref
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.PUSHpBASEp1 >PUSHB pBase+1
|
|
|
|
|
PCC.PUSHpBASEp1.L .EQ *-PCC.PUSHpBASEp1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.PUSHpBASEpA clc
|
|
|
|
|
adc pBase
|
|
|
|
|
>PUSHA
|
|
|
|
|
PCC.PUSHpBASEpA.L .EQ *-PCC.PUSHpBASEpA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
PCC.PushFromPtr >PULLW ZPPtr1
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPPtr1),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
PCC.PushFromPtr.L .EQ *-PCC.PushFromPtr
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.OPChars .AS "!~+-*/%=&|^<>["
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CC.OPChars.Cnt .EQ *-CC.OPChars
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Pre Operators: & * + - ! ~ ++ --
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.PREOPS >PSTR "&" ref
|
|
|
|
|
>PSTR "*" deref
|
|
|
|
|
>PSTR "+" abs
|
|
|
|
|
>PSTR "-" change sign
|
|
|
|
|
>PSTR "!" logical not
|
|
|
|
|
>PSTR "~" bitwise not
|
|
|
|
|
>PSTR "++" pre increase
|
|
|
|
|
>PSTR "--" pre decrease
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Post Operators: ++ --
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.POSTOPS >PSTR "++"
|
|
|
|
|
>PSTR "--"
|
|
|
|
|
>PSTR "["
|
|
|
|
|
>PSTR "."
|
|
|
|
|
>PSTR "->"
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Assignment Operators: = += -= *= /= %= <<= >>= &= ^= |=
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.AOPS >PSTR "="
|
|
|
|
|
>PSTR "+="
|
|
|
|
|
>PSTR "-="
|
|
|
|
|
>PSTR "*="
|
|
|
|
|
>PSTR "/="
|
|
|
|
|
>PSTR "%="
|
|
|
|
|
>PSTR "<<="
|
|
|
|
|
>PSTR ">>="
|
|
|
|
|
>PSTR "&="
|
|
|
|
|
>PSTR "^="
|
|
|
|
|
>PSTR "!="
|
|
|
|
|
.HS 00
|
|
|
|
|
*-- Binary ---- H to L precedence -----
|
|
|
|
|
* Arithmetic Operators: * / %
|
|
|
|
|
* Arithmetic Operators: + -
|
|
|
|
|
* Shift Operators: << >>
|
|
|
|
|
* Relational Operators: < > >= < >= == !=
|
|
|
|
|
* Bitwise Operators: & | ^ ~
|
|
|
|
|
* Logical Operators: && ||
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS >PSTR "*"
|
|
|
|
|
>PSTR "/"
|
|
|
|
|
>PSTR "%"
|
|
|
|
|
>PSTR "+"
|
|
|
|
|
>PSTR "-"
|
|
|
|
|
>PSTR "<<"
|
|
|
|
|
>PSTR ">>"
|
|
|
|
|
>PSTR "<"
|
|
|
|
|
>PSTR "<="
|
|
|
|
|
>PSTR ">"
|
|
|
|
|
>PSTR ">="
|
|
|
|
|
>PSTR "=="
|
|
|
|
|
>PSTR "!="
|
|
|
|
|
>PSTR "&"
|
|
|
|
|
>PSTR "|"
|
|
|
|
|
>PSTR "^"
|
|
|
|
|
>PSTR "&&"
|
|
|
|
|
>PSTR "||"
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Reserved Directives:
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.DIRS >PSTR "define"
|
|
|
|
|
>PSTR "include"
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Reserved Keywords:
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.KW >PSTR "if"
|
|
|
|
|
>PSTR "while"
|
|
|
|
|
>PSTR "else"
|
|
|
|
|
>PSTR "do"
|
|
|
|
|
>PSTR "for"
|
|
|
|
|
>PSTR "switch"
|
|
|
|
|
>PSTR "case"
|
|
|
|
|
>PSTR "break"
|
|
|
|
|
>PSTR "continue"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
>PSTR "return"
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "sizeof"
|
|
|
|
|
>PSTR "struct"
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
2022-02-04 14:57:17 +00:00
|
|
|
|
CC.SCSPEC >PSTR "auto"
|
|
|
|
|
>PSTR "register"
|
|
|
|
|
>PSTR "static"
|
|
|
|
|
>PSTR "extern"
|
|
|
|
|
>PSTR "typedef"
|
|
|
|
|
.HS 00
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.TYPEQUAL >PSTR "const" ALL
|
|
|
|
|
>PSTR "volatile"
|
|
|
|
|
CC.TYPESPEC >PSTR "signed" char,int,long
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "unsigned" char,int,long
|
|
|
|
|
>PSTR "short" int
|
|
|
|
|
CC.TYPES >PSTR "void"
|
|
|
|
|
>PSTR "char"
|
|
|
|
|
>PSTR "int"
|
|
|
|
|
>PSTR "long"
|
|
|
|
|
>PSTR "float"
|
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.Type2FPU .DA #FPU.wMUL,#FPU.iMUL,#FPU.uMUL,#FPU.lMUL,#FPU.fMUL
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.FTYPES >PSTR "fastcall"
|
|
|
|
|
* .HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.TYPESIZE .HS 0001010202040405
|
|
|
|
|
CC.TYPESIGN .HS 0000FF00FF00FFFF
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.MAIN .AZ "main"
|
|
|
|
|
CC.MAIN.DEF .DA #SYM.T.SINT,#0,#SYM.T.SINT,#0,#SYM.T.UCHAR,#SYM.Q.PPOINTER,0
|
|
|
|
|
CC.MAIN.DEF.LEN .EQ *-CC.MAIN.DEF
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CC.LIBC >PSTR "chtyp"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ChTyp
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "chmod"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ChMod
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fstat"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FStat
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "stat"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Stat
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "mkdir"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MKDir
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "mknod"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MKNod
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "mkfifo"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MKFIFO
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "pipe"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Pipe
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "opendir"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.OpenDir
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "readdir"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ReadDir
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "closedir"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.CloseDir
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "open"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Open
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "close"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Close
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "read"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Read
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "write"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Write
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "chown"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ChOwn
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fputc"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FPutC
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "putchar"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PutChar
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getc"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetC
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getchar"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetChar
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fputs"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FPutS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "puts"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PutS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fgets"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FGetS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "ungetc"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.UngetC
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fopen"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FOpen
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fclose"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FClose
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fread"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FRead
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fwrite"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FWrite
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fflush"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FFlush
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fseek"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FSeek
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "ftell"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FTell
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "feof"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FEOF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "remove"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Remove
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "rename"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Rename
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "printf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PrintF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fprintf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FPrintF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "sprintf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.SPrintF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "scanf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ScanF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fscanf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FScanF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "sscanf"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.SScanF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$50"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$52"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$54"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$56"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$58"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$5A"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "$5C"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "setattr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.SetAttr
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "mount"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "umount"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "online"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getstkobj"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "shift"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "argv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "argvDup"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "geterrmsg"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "atof"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.AToF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "atoi"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.AToI
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "atol"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.AToL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strtof"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrToF
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strtol"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrToL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strtoul"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrToUL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "realpath"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "expand"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strlen"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrLen
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strcpy"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrCpy
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strcat"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrCat
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strdup"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrDup
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strupr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrUpr
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strlwr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrLwr
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strcmp"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrCmp
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strcasecmp"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrCaseCmp
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getdevbyname"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getdevstatus"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "mkdev"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "ioctl"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "loadlib"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "unloadlib"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "loaddrv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "insdrv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "execl"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.ExecL
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "execv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "fork"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Fork
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "kill"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Kill
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "loadfile"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "loadtxtfile"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "filesearch"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getmemstat"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "strvnew"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "strvset"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "strvget"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "strvfree"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "putenv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PutEnv
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "setenv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.SetEnv
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getenv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetEnv
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "unsetenv"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.UnsetEnv
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "time"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Time
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "strftime"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.StrFTime
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "ptime2time"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "ctime2time"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.CTime2Time
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "md5"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MD5
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "md5init"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MD5Init
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "md5update"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MD5Update
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "md5finalize"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.MD5Finalize
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getpwuid"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetPWUID
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getpwname"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetPWName
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "putpw"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PutPW
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getgrpgid"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetGRGID
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "getgrpname"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetGRName
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "putgr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.PutGR
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "opensession"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "closesession"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistgetdata"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistadddata"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistsetdata"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistgetbyid"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistnewkey"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistlookup"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistfree"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "slistnew"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "malloc"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.GetMem
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "realloc"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.Realloc
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getmemptr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "free"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#1,#SYS.FreeMem
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "newstkobj"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "loadstkobj"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "getstkobjptr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
* >PSTR "freestkobj"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
* .DA #2,#1,#0
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
>PSTR "pwr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.PWR
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "log"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.LOG
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "sqr"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.SQR
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "exp"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.EXP
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "cos"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.COS
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "sin"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.SIN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "tan"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.TAN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PSTR "atan"
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.DA #2,#2,#FPU.ATAN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.HS 00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
|
|
|
|
PathBuf .BS MLI.MAXPATH+1
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
bDebug .BS 1
|
|
|
|
|
bTrace .BS 1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
hFilePtr .BS 1
|
|
|
|
|
hFiles .BS FILES.MAX
|
|
|
|
|
|
|
|
|
|
LineCntPtr .BS 1
|
|
|
|
|
.BS 1 for inc inc
|
|
|
|
|
LineCnts .BS FILES.MAX+2
|
|
|
|
|
|
|
|
|
|
hLineBuf .BS 1
|
|
|
|
|
LineBufPtr .BS 2
|
|
|
|
|
|
|
|
|
|
CC.CmdSave .BS 1
|
|
|
|
|
|
|
|
|
|
CC.hDefines .BS 1
|
|
|
|
|
CC.hTags .BS 1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.hSymbols .BS SCOPE.MAX
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
CC.hCode .BS 1
|
|
|
|
|
CC.hConst .BS 1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.ConstCnt .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
CC.hData .BS 1
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.hLocal .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
CC.hStack .BS 1
|
|
|
|
|
|
|
|
|
|
CC.SaveDefine .BS 2
|
|
|
|
|
|
|
|
|
|
DS.END .ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/bin/cc.s
|
|
|
|
|
ASM
|