2018-09-28 17:05:11 +00:00
|
|
|
; Copyright 2018 faddenSoft. All Rights Reserved.
|
|
|
|
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
|
|
|
;
|
|
|
|
; Sources:
|
|
|
|
; NiftyList, by Dave Lyons
|
|
|
|
; What's Where in the Apple, by William F. Luebbert
|
|
|
|
|
|
|
|
*SYNOPSIS Symbols from the Apple II monitor ROM
|
|
|
|
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_WNDLEFT @ $20 ;left column of scroll window
|
|
|
|
MON_WNDWDTH @ $21 ;width of scroll window
|
|
|
|
MON_WNDTOP @ $22 ;top of scroll window
|
2020-01-20 00:49:02 +00:00
|
|
|
MON_WNDBTM @ $23 ;bottom of scroll window
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_CH @ $24 ;cursor horizontal displacement
|
|
|
|
MON_CV @ $25 ;cursor vertical displacement
|
|
|
|
MON_GBASL @ $26 ;base address for lo-res drawing (lo)
|
|
|
|
MON_GBASH @ $27 ;base address for lo-res drawing (hi)
|
2020-01-20 00:49:02 +00:00
|
|
|
MON_BASL @ $28 ;base address for text output (lo)
|
|
|
|
MON_BASH @ $29 ;base address for text output (hi)
|
|
|
|
;MON_BAS2L @ $2A ;used when scrolling text
|
|
|
|
;MON_BAS2H @ $2B ;used when scrolling text
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_H2 @ $2C ;right end of horizontal line drawn by HLINE
|
|
|
|
MON_V2 @ $2D ;bottom of vertical line drawn by VLINE
|
2019-10-27 18:12:22 +00:00
|
|
|
MON_COLOR @ $30 ;lo-res graphics color
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_INVFLAG @ $32 ;text mask (255=normal, 127=flash, 63=inv)
|
|
|
|
MON_PROMPT @ $33 ;prompt character
|
|
|
|
MON_CSWL @ $36 ;character output hook (lo)
|
|
|
|
MON_CSWH @ $37 ;character output hook (hi)
|
|
|
|
MON_KSWL @ $38 ;character input hook (lo)
|
|
|
|
MON_KSWH @ $39 ;character input hook (hi)
|
|
|
|
MON_PCL @ $3A ;program counter save
|
|
|
|
MON_PCH @ $3B ;program counter save
|
|
|
|
MON_A1L @ $3C ;general purpose
|
|
|
|
MON_A1H @ $3D ;general purpose
|
|
|
|
MON_A2L @ $3E ;general purpose
|
|
|
|
MON_A2H @ $3F ;general purpose
|
2019-10-27 00:32:22 +00:00
|
|
|
MON_A3L @ $40 ;general purpose
|
|
|
|
MON_A3H @ $41 ;general purpose
|
|
|
|
MON_A4L @ $42 ;general purpose
|
|
|
|
MON_A4H @ $43 ;general purpose
|
|
|
|
MON_A5L @ $44 ;general purpose
|
|
|
|
MON_A5H @ $45 ;general purpose
|
2019-09-21 02:04:10 +00:00
|
|
|
MON_RNDL @ $4E ;low byte of KEYIN "random" value
|
|
|
|
MON_RNDH @ $4F ;high byte of KEYIN "random" value
|
2018-09-28 17:05:11 +00:00
|
|
|
|
Allow explicit widths in project/platform symbols, part 1
The ability to give explicit widths to local variables worked out
pretty well, so we're going to try adding the same thing to project
and platform symbols.
The first step is to allow widths to be specified in platform files,
and set with the project symbol editor. The DefSymbol editor is
also used for local variables, so a bit of dancing is required.
For platform/project symbols the width is optional, and is totally
ignored for constants. (For variables, constants are used for the
StackRel args, so the width is meaningful and required.)
We also now show the symbol's type (address or constant) and width
in the listing. This gets really distracting when overused, so we
only show it when the width is explicitly set. The default width
is 1, which most things will be, so users can make an aesthetic
choice there. (The place where widths make very little sense is when
the symbol represents a code entry point, rather than a data item.)
The maximum width of a local variable is now 256, but it's not
allowed to overlap with other variables or run of the end of the
direct page. The maximum width of a platform/project symbol is
65536, with bank-wrap behavior TBD.
The local variable table editor now refers to stack-relative
constants as such, rather than simply "constant", to make it clear
that it's not just defining an 8-bit constant.
Widths have been added to a handful of Apple II platform defs.
2019-10-01 21:58:24 +00:00
|
|
|
MON_BRKV @ $03F0 2 ;address of BRK handler
|
|
|
|
MON_SOFTEVEC @ $03F2 2 ;address of RESET handler
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_PWREDUP @ $03F4 ;power-up RESET checksum
|
Allow explicit widths in project/platform symbols, part 1
The ability to give explicit widths to local variables worked out
pretty well, so we're going to try adding the same thing to project
and platform symbols.
The first step is to allow widths to be specified in platform files,
and set with the project symbol editor. The DefSymbol editor is
also used for local variables, so a bit of dancing is required.
For platform/project symbols the width is optional, and is totally
ignored for constants. (For variables, constants are used for the
StackRel args, so the width is meaningful and required.)
We also now show the symbol's type (address or constant) and width
in the listing. This gets really distracting when overused, so we
only show it when the width is explicitly set. The default width
is 1, which most things will be, so users can make an aesthetic
choice there. (The place where widths make very little sense is when
the symbol represents a code entry point, rather than a data item.)
The maximum width of a local variable is now 256, but it's not
allowed to overlap with other variables or run of the end of the
direct page. The maximum width of a platform/project symbol is
65536, with bank-wrap behavior TBD.
The local variable table editor now refers to stack-relative
constants as such, rather than simply "constant", to make it clear
that it's not just defining an 8-bit constant.
Widths have been added to a handful of Apple II platform defs.
2019-10-01 21:58:24 +00:00
|
|
|
MON_USRADDR @ $03F8 3 ;jump to function that handles monitor Ctrl-Y
|
|
|
|
MON_NMIVEC @ $03FB 3 ;jump to function that handles NMI
|
|
|
|
MON_IRQADDR @ $03FE 2 ;address of IRQ handler
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_PLOT @ $F800 ;lo-res plot at X=Y-reg, Y=Acc
|
|
|
|
MON_PLOT1 @ $F80E ;lo-res plot at X=Y-reg, Y per GBASL/H
|
|
|
|
MON_HLINE @ $F819 ;lo-res horiz line at Y=Acc with X from $2c
|
|
|
|
MON_VLINE @ $F828 ;lo-res vert line at X=Y-reg and Y from Acc to $2b
|
|
|
|
MON_CLRSCR @ $F832 ;clear lo-res screen to black
|
|
|
|
MON_CLRTOP @ $F836 ;clear top part of lo-res screen to black
|
|
|
|
MON_GBASCALC @ $F847 ;compute gfx base addr for line in Acc
|
|
|
|
MON_NXTCOL @ $F85F ;change lo-res color to (color)+3
|
|
|
|
MON_SETCOL @ $F864 ;set lo-res color to Acc
|
|
|
|
MON_SCRN @ $F871 ;load Acc with lo-res value at Y=Acc, X=X-reg
|
|
|
|
MON_INSDS1_2 @ $F88C
|
|
|
|
MON_INSDS2 @ $F88E
|
|
|
|
MON_GET816LEN @ $F890
|
|
|
|
MON_INSTDSP @ $F8D0 ;monitor/mini-asm display
|
|
|
|
MON_PRNTYX @ $F940 ;print Y-reg/X-reg as 4 hex digits
|
|
|
|
MON_PRNTAX @ $F941 ;print Acc/X-reg as 4 hex digits
|
|
|
|
MON_PRNTX @ $F944 ;print X-reg as 2 hex digits
|
|
|
|
MON_PRBLNK @ $F948 ;print 3 spaces
|
2019-10-07 00:07:07 +00:00
|
|
|
MON_PRBL2 @ $F94A ;print multiple spaces, count in X-reg
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_PCADJ @ $F953 ;monitor/mini-asm PC adjust
|
|
|
|
MON_TEXT2COPY @ $F962
|
|
|
|
MON_OLDIRQ @ $FA40 ;autostart ROM IRQ handler
|
|
|
|
MON_BREAK @ $FA4C
|
|
|
|
MON_OLDBRK @ $FA59
|
|
|
|
MON_RESET @ $FA62
|
|
|
|
MON_PWRUP @ $FAA6
|
|
|
|
MON_SLOOP @ $FABA
|
|
|
|
MON_REGDSP @ $FAD7 ;display register contents
|
|
|
|
MON_RTBL @ $FB19
|
|
|
|
MON_PREAD @ $FB1E ;read paddle specifed by X-reg, return in Y-reg
|
|
|
|
MON_PREAD4 @ $FB21
|
|
|
|
MON_INIT @ $FB2F ;screen initialization
|
|
|
|
MON_SETTXT @ $FB39 ;set screen to text mode
|
|
|
|
MON_SETGR @ $FB40 ;set screen to graphics mode
|
|
|
|
MON_SETWND @ $FB4B ;set normal low-res graphics window
|
|
|
|
MON_SETWND2 @ $FB51
|
|
|
|
MON_TABV @ $FB5B ;place cursor at line (A-reg) and column (ch)
|
|
|
|
MON_APPLEII @ $FB60 ;clear screen and put "Apple II" into first line
|
|
|
|
MON_SETPWRC @ $FB6F
|
|
|
|
MON_VIDWAIT @ $FB78
|
|
|
|
MON_KBDWAIT @ $FB88
|
|
|
|
MON_VERSION @ $FBB3
|
|
|
|
MON_ZIDBYTE2 @ $FBBF
|
|
|
|
MON_ZIDBYTE @ $FBC0
|
|
|
|
MON_BASCALC @ $FBC1 ;calculate text base address
|
|
|
|
MON_BELL1 @ $FBDD ;sound bell regardless of output device
|
|
|
|
MON_BELL1_2 @ $FBE2
|
|
|
|
MON_BELL2 @ $FBE4 ;sound bell
|
|
|
|
MON_STORADV @ $FBF0
|
|
|
|
MON_ADVANCE @ $FBF4 ;move cursor right
|
|
|
|
MON_VIDOUT @ $FBFD ;output Acc as text
|
|
|
|
MON_BS @ $FC10 ;move cursor left
|
|
|
|
MON_UP @ $FC1A ;move cursor up
|
|
|
|
MON_VTAB @ $FC22 ;tab to row specified in Acc
|
|
|
|
MON_VTABZ @ $FC24
|
|
|
|
MON_CLREOP @ $FC42 ;clear screen from cursor to end of page
|
|
|
|
MON_HOME @ $FC58 ;clear screen and reset text output to top-left
|
|
|
|
MON_CR @ $FC62 ;perform a carriage return
|
|
|
|
MON_LF @ $FC66 ;perform a line feed
|
Allow explicit widths in project/platform symbols, part 1
The ability to give explicit widths to local variables worked out
pretty well, so we're going to try adding the same thing to project
and platform symbols.
The first step is to allow widths to be specified in platform files,
and set with the project symbol editor. The DefSymbol editor is
also used for local variables, so a bit of dancing is required.
For platform/project symbols the width is optional, and is totally
ignored for constants. (For variables, constants are used for the
StackRel args, so the width is meaningful and required.)
We also now show the symbol's type (address or constant) and width
in the listing. This gets really distracting when overused, so we
only show it when the width is explicitly set. The default width
is 1, which most things will be, so users can make an aesthetic
choice there. (The place where widths make very little sense is when
the symbol represents a code entry point, rather than a data item.)
The maximum width of a local variable is now 256, but it's not
allowed to overlap with other variables or run of the end of the
direct page. The maximum width of a platform/project symbol is
65536, with bank-wrap behavior TBD.
The local variable table editor now refers to stack-relative
constants as such, rather than simply "constant", to make it clear
that it's not just defining an 8-bit constant.
Widths have been added to a handful of Apple II platform defs.
2019-10-01 21:58:24 +00:00
|
|
|
MON_SCROLL @ $FC70 ;scroll up one line
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_CLREOL @ $FC9C ;clear to end of line
|
|
|
|
MON_CLREOLZ @ $FC9E
|
|
|
|
MON_WAIT @ $FCA8 ;delay for (26 + 27*Acc + 5*(Acc*Acc))/2 cycles
|
2019-10-27 00:32:22 +00:00
|
|
|
MON_NXTA4 @ $FCB4 ;increment A4, fall through into NXTA1
|
|
|
|
MON_NXTA1 @ $FCBA ;increment A1; set carry if A1 >= A2 before inc
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_HEADR @ $FCC9 ;write cassette sync
|
|
|
|
MON_WRTAPE @ $FCE5 ;casssette write
|
2019-09-21 02:04:10 +00:00
|
|
|
MON_RD2BIT @ $FCFA ;cassette read
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_RDKEY @ $FD0C ;read key
|
|
|
|
MON_FD10 @ $FD10
|
|
|
|
MON_RDKEY1 @ $FD18
|
|
|
|
MON_KEYIN @ $FD1B ;get next key input from keyboard hardware
|
|
|
|
MON_RDCHAR @ $FD35 ;calls RDKEY to get next char
|
|
|
|
MON_GETLNZ @ $FD67 ;get a line of input
|
|
|
|
MON_GETLN @ $FD6A ;get a line of input
|
|
|
|
MON_GETLN0 @ $FD6C
|
|
|
|
MON_GETLN1 @ $FD6F
|
|
|
|
MON_CROUT1 @ $FD8B
|
|
|
|
MON_CROUT @ $FD8E ;print a carriage return
|
|
|
|
MON_PRA1 @ $FD92 ;print CR, then hex of A1H/A1L, then minus sign
|
|
|
|
MON_PRBYTE @ $FDDA ;print Acc as two-digit hex number
|
|
|
|
MON_PRHEX @ $FDE3 ;print right nibble of Acc as single hex digit
|
|
|
|
MON_COUT @ $FDED ;print Acc to output device
|
|
|
|
MON_COUT1 @ $FDF0
|
|
|
|
MON_COUTZ @ $FDF6
|
|
|
|
MON_IDROUTINE @ $FE1F
|
2019-10-27 00:32:22 +00:00
|
|
|
MON_MOVE @ $FE2C ;move bytes from A1 to A4 until A1=A2
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_LIST @ $FE5E ;disassemble 20 instructions (not on GS)
|
|
|
|
MON_SETINV @ $FE80 ;set video mode to inverse
|
|
|
|
MON_SETNORM @ $FE84 ;set video mode to normal
|
|
|
|
MON_SETKBD @ $FE89 ;reset char input handler to ROM
|
|
|
|
MON_INPORT @ $FE8B
|
|
|
|
MON_SETVID @ $FE93 ;reset char output handler to ROM
|
|
|
|
MON_OUTPORT @ $FE95
|
|
|
|
MON_GO @ $FEB6
|
|
|
|
MON_WRITE @ $FECD ;write data to cassette
|
|
|
|
MON_READ @ $FEFD ;read data from cassette
|
2019-09-21 02:04:10 +00:00
|
|
|
MON_READ2 @ $FF02 ;read data from cassette
|
2019-09-16 23:58:32 +00:00
|
|
|
MON_PRERR @ $FF2D ;print "ERR" and sound bell
|
|
|
|
MON_BELL @ $FF3A ;sound bell
|
|
|
|
MON_RESTORE @ $FF3F ;restore 6502 registers from $45-48
|
|
|
|
MON_SAVE @ $FF4A ;save 6502 registers to $45-49
|
|
|
|
MON_IORTS @ $FF58 ;JSR here to find out where one is
|
|
|
|
MON_OLDRST @ $FF59 ;RESET entry point
|
|
|
|
MON_MON @ $FF65 ;normal entry to monitor
|
|
|
|
MON_MONZ @ $FF69 ;reset and enter monitor
|
|
|
|
MON_MONZ2 @ $FF6C
|
|
|
|
MON_MONZ4 @ $FF70
|
|
|
|
MON_DIG @ $FF8A
|
|
|
|
MON_GETNUM @ $FFA7
|
|
|
|
MON_NXTCHR @ $FFAD ;part of GETLN input loop
|
|
|
|
MON_TOSUB @ $FFBE
|
|
|
|
MON_ZMODE @ $FFC7
|