A2osX/SCMASM.30/SCMASM.S.DATA.txt

242 lines
7.7 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
*--------------------------------------
* PAGE ZERO VARIABLES
*--------------------------------
* $00 THRU $1F RESERVED FOR USER
*---Apple Monitor, mostly--------
MON.WIDTH .EQ $21
CH80 .EQ $57B
CH .EQ $24
CV .EQ $25
BASL .EQ $28
YSAVE .EQ $2F
ESCAPE.FLAG .EQ $30
MON.MODE .EQ $31
MON.INVFLG .EQ $32
MON.YSAV .EQ $34
HOOK.OUT .EQ $36,37
HOOK.IN .EQ $38,39
A0L .EQ $3A
A0H .EQ $3B
A1L .EQ $3C
A1H .EQ $3D
A2L .EQ $3E
A2H .EQ $3F
*--------------------------------
* ProDOS USES $40-4F
*--------------------------------
A3L .EQ $40
A3H .EQ $41
A4L .EQ $42
A4H .EQ $43
*--------------------------------
.DUMMY
.OR $50
*--------------------------------
*
* Following needed at all times
*
*--------------------------------
SCREEN.WIDTH .BS 1
INFLAG .BS 1
LO.MEM .BS 2 START OF SYMBOL TABLE
EOT .BS 2 END OF SYMBOL TABLE
PP .BS 2 START OF SOURCE PROGRAM
HI.MEM .BS 2 END OF SOURCE CODE
*--------------------------------
PAGE.NUMBER .BS 2
PAGE.LENGTH .BS 1 =0 means no titles
LINE.COUNT .BS 1
DGTCNT .BS 1
INCREMENT.VALUE .BS 2 FOR AUTO-LINE-NUMBERING (INIT=10)
CURLNO .BS 2 NUMBER OF LAST-SUBMITTED LINE (INIT=990)
PASS .BS 1 PASS NUMBER (0=PASS 1, 1=PASS 2)
CHAR.PNTR .BS 1
CURRENT.CHAR .BS 1 CURRENT CHARACTER FROM 'GNC'
CURRENT.MAJOR.LABEL .BS 2 PNTR TO CURRENT MAJOR LABEL
EXP.NEW .BS 1 NEW EXPRESSION FLAG
STPNTR .BS 2 SYMBOL TABLE WORKING POINTER
TPTR .BS 2 SYMBOL TABLE TEMP POINTER
BASE.INDEX .BS 1 used in EXPR
LC.MODE .BS 1
EXP.VALUE .BS 4
EXP.VALUE64 .BS 4
SYM.VALUE .BS 4
EXP.UNDEF .BS 1 UNDEFINED TERM FLAG
EMIT.COLUMN .BS 1 KEEPS TRACK OF COLUMN FOR EMIT
ORGN .BS 4
RPTCHR .BS 1 (NML, NTKN)
RPTCNT .BS 1 (NML, NTKN)
PNTR .BS 2 SEARCH STRING PNTR
INSAVE .BS 8
*--------------------------------
CALL.NUM .BS 2 CURRENT MACRO CALL NUMBER
MACLBL .BS 2
CONV.CTRL .BS 1 CONTROL FLAG INSIDE CONVERT.LINE.NUMBER
MACRO.LEVEL .BS 1
PARAM.PNTR .BS 1
PARAM.CNT .BS 1
*--------------------------------
PROMPT.FLAG .BS 1 NULL, "H", OR "I"
HIDE.HIMEM .BS 2 SAVES HIMEM DURING "HIDE"
CURRENT.LINE.NUMBER .BS 2
LF.ALL .BS 1 =0 TO LIST, <0 TO NOT LIST
LF.MACRO .BS 1 =0 TO LIST MACRO EXPANSIONS
FLAG.SPEED .BS 1
DLIM .BS 1 ".AS" DELIMITER, also ASM
SRCP .BS 2 POINTER TO CURRENT SOURCE LINE
ENDP .BS 2 POINTER TO END OF LINE RANGE
EXP.FWDREF .BS 1
AUTOLN.FLAG .BS 1 +=MANUAL, -=AUTO LINE NUMBERS
LINE.START .BS 2
LINE.END .BS 2
*--------------------------------
ZP.COMMON .EQ *
*--------------------------------
*
* Variables used only during SPECIFIC commands
*
*--------------------------------
BLKSIZ .BS 1 used in MOVE.TEXT.UP and MOVE.TEXT.DOWN
MOVE.DISTANCE .BS 2 used in NML, COPY, and MOVE.TEXT.UP
AUTO.FLAG .BS 1 +=VERIFY, -=AUTO REPLACE
CHANGE.CNT .BS 1 # OF REPLACEMENTS IN THIS LINE
ED.FCOL .BS 1
ED.FKEY .BS 1
ED.PNTR .BS 1
ED.BEGLIN .BS 1
TEXT.OPTIONS .BS 1 used in TEXT command only
REPLACE.LENGTH .BS 1
SOURCE.LENGTH .BS 1
WBUF.LENGTH .BS 1
KEY.PNTR .BS 2 USED IN FIND, REPLACE
BUF.PNTR .BS 2 USED IN FIND, REPLACE
KEY.ADDR .BS 2 SEARCH KEY ADDRESS
MATCH.END .BS 1
LC.FLAG .BS 1 +=AS IS, -=ACCEPT BOTH CASES
*--------------------------------
.OR ZP.COMMON
*--------------------------------
*
* Variables used only during Assembly
*
*--------------------------------
SEARCH.KEY .BS 3 USED BY OPCODE SEARCH ROUTINE
OPTBL.PNTR .BS 2 USED BY OPCODE SEARCH ROUTINE
DO.INDEX .BS 1 DO level: =0 if empty, else 1-63
DO.STACK .BS 8 64 bits, =1 if true
DO.SKIP.CNT .BS 1 COUNTS .DO NESTS WHEN SKIPPING
NYBBLE.FLAG .BS 1 .AC DIRECTIVE
BYTE .BS 1 .AC DIRECTIVE
PHASE.FLAG .BS 1 +=NORMAL, -=IN PHASE
DUMMY.FLAG .BS 1 +=NORMAL, -=IN DUMMY SECTION
TF.FLAG .BS 1
TRGT .BS 2 TARGET ADDRESS
MACSTK .BS 2 MACRO STACK POINTER
ERROR.COUNT .BS 2
*--------------------------------
OBJ.BYTE .BS 1
ADDR.LENGTH .BS 1
LF.CONDITIONAL .BS 1 =0 TO LIST FALSE SETS
LF.XTRA.BYTES .BS 1 =0 TO LIST XTRA BYTES ON XTRA LINES
EMIT.MARGIN .BS 1 COLUMN FOR LINE NUMBER TO START IN
MACRO.SAVEX .BS 1
DUMMY.ORGN .BS 4
ORIGIN.SAVE .BS 4
FLAG.MA .BS 1
CALL.CNTR .BS 2 TOTAL # OF MACRO CALLS
*--------------------------------
*---ONLY IN .BS DIRECTIVE--------
BS.COUNT .BS 2 # BYTES TO RESERVE
*---ONLY IN .AS & .AT DIRECTIVES
AS.HIBIT .BS 1 BIT 7 VALUE FOR .AS/.AT
AT.HIBIT .BS 1 BIT 7 TOGGLE FOR LAST BYTE BIT 7
*--------------------------------
*
*---$EB reserved for ECHO TEXTALKER software---
*
*---$F0-FF reserved for ASM.PARTICULAR---
*
*--------------------------------
.ED
*--------------------------------
* CHARACTER CODES
*--------------------------------
CHR.CTRL.I .EQ $89
CHR.RETURN .EQ $8D
CHR.BLANK .EQ $A0
CHR.DOLLAR .EQ $A4
CHR.STAR .EQ $AA
CHR.DASH .EQ $AD
CHR.PERIOD .EQ $2E
CHR.BSLASH .EQ $DC
*--------------------------------
* MISCELLANEOUS SYMBOLS
*--------------------------------
SYMBOL .EQ $0100 SYMBOL PACK AREA
HSHTBL .EQ $0130 HASH POINTER TABLE
KBUF .EQ $0170 - $01BF KEY STRING
WBUF .EQ $0200 WORKING BUFFER
WBUF.MAX .EQ 248 AND ITS LENGTH
PATHNAME .EQ $2CE (LAST 50 BYTES)
*--------------------------------
* ROM-BASED ROUTINES
*--------------------------------
MON.PRNTAX .EQ $F941
MON.PRBL2 .EQ $F94A PRINT (X) BLANKS
MON.INIT .EQ $FB2F TEXT MODE, FULL WINDOW
MON.ADVANC .EQ $FBF4
MON.BS .EQ $FC10
MON.UP .EQ $FC1A
MON.VTAB .EQ $FC22
MON.CLREOP .EQ $FC42
MON.HOME .EQ $FC58
MON.LF .EQ $FC66
MON.CLREOL .EQ $FC9C
MON.DELAY .EQ $FCA8
MON.RDKEY .EQ $FD0C READ NEXT CHAR
MON.READCH .EQ $FD18
MON.PHEX .EQ $FDDA PRINT BYTE IN HEX
MON.COUT .EQ $FDED
MON.BL1 .EQ $FE00
MON.SETKBD .EQ $FE89
MON.SETVID .EQ $FE93
MON.OUTPORT .EQ $FE95 SET NEW PR#N OUTPUT
MON.BELL .EQ $FF3A RING THE BELL
MON.RTS .EQ $FF58 ONLY AN "RTS"
MNTR .EQ $FF69 CALL-151 ENTRY INTO MONITOR
MON.GETNUM .EQ $FFA7
MON.TOSUB .EQ $FFBE
MON.CHRTBL .EQ $FFCC MONITOR COMMAND CHAR TABLE
*--------------------------------
MON.RESET .EQ $3F2 THRU 3F4
*--------------------------------
.MA INCD
INC ]1
BNE :1
INC ]1+1
:1
.EM
*--------------------------------
RDMAIN .EQ $C002
RDAUX .EQ $C003
RDROM .EQ $C082
RDRAM .EQ $C083
WRMAIN .EQ $C004
WRAUX .EQ $C005
AUX.CODE .EQ $DF00
*--------------------------------
.MA SYM
.DO AUXMEM
JSR ]1.]2
.ELSE
]1 (]2),Y
.FIN
.EM
*--------------------------------------
MAN
SAVE usr/src/scmasm.30/scmasm.s.data
LOAD usr/src/scmasm.30/scmasm.s
ASM