Files
Shawn Quick dfcaae62dd Add qlink, the disk tools, and a bootable ProDOS 8 image.
Move the assembler to src/qasm. qlink links OMF 1.0 and 2.0 from a script. makeBin flattens a load file, qomf dumps OMF, and qpro builds ProDOS volumes. APW and MPW assemble through the ORCA front end. Relocatable modules emit OMF objects. Listings stay off unless -l is set.

make boot assembles the GS/OS 6.0.1 ProDOS 8 kernel and BASIC.SYSTEM into an 800K volume. BASIC.SYSTEM accepts ls and pfx, and its splash reports PRODOS BASIC 2.0, copyright 1983-2026. IIGS.601.SRC is the source and the BASIC.SYSTEM oracle that image is built from.
2026-10-16 14:41:55 -07:00

1 line
50 KiB
NASM

print push
print off
****************************************************************
*
* SYSEQUS
*
*
* Bank FF Equates
* Bank E1 Equates
*
*
* Original Equates by Fern Bachman
* Modified by Steven E. Glass, February 5, 1985
* Modified by Joe Bo, 1987-1988
* Minor mods Dave Lyons 25-Sep-90
* Fixed a comment 26-Jan-93 DAL
*
****************************************************************
****************************************************************
*
* Copyright (C) 1985-1987,1993
* Apple Computer, Inc.
* All Rights Reserved
*
****************************************************************
Blanks off
; copy equates1
F8VERSION EQU $06 ; F8 ROM //e ID byte
LOC0 EQU $00 ;vector for autostart from disk
LOC1 EQU $01
PRINTTMP EQU $06 ;$06-$08 saved and restore by print rtne
WNDLFT EQU $20 ;left edge of text window
WNDWDTH EQU $21 ;width of text window
WNDTOP EQU $22 ;top of text window
WNDBTM EQU $23 ;bottom+1 of text window
CH EQU $24 ;cursor horizontal position
CV EQU $25 ;cursor vertical position
GBASL EQU $26 ;lo-res graphics base addr.
GBASH EQU $27
BASL EQU $28 ;text base address
BASH EQU $29
BAS2L EQU $2A ;temp base for scrolling
BAS2H EQU $2B
H2 EQU $2C ;temp for lo-res graphics
LMNEM EQU $2C ;temp for mnemonic decoding
V2 EQU $2D ;temp for lo-res graphics
RMNEM EQU $2D ;temp for mnemonic decoding
MASK EQU $2E ;color mask for lo-res gr.
FORMAT EQU $2E ;temp for opcode decode
LENGTH EQU $2F ;temp for opcode decode
COLOR EQU $30 ;color for lo-res graphics
MONMODE EQU $31 ;Monitor mode
INVFLG EQU $32 ;normal/inverse(/flash)
PROMPT EQU $33 ;prompt character
YSAV EQU $34 ;position in Monitor command
YSAV1 EQU $35 ;temp for Y register
CSWL EQU $36 ;character output hook
CSWH EQU $37
KSWL EQU $38 ;character input hook
KSWH EQU $39
PCL EQU $3A ;temp for program counter
PCH EQU $3B
A1L EQU $3C ;Monitor temp
A1H EQU $3D ;Monitor temp
A2L EQU $3E ;Monitor temp
A2H EQU $3F ;Monitor temp
A3L EQU $40 ;Monitor temp
A3H EQU $41 ;Monitor temp
A4L EQU $42 ;Monitor temp
A4H EQU $43 ;Monitor temp
*A5L EQU $44 ;Monitor temp ?????
A5H EQU $45 ;Monitor temp
*ACC EQU $45 ;Acc after break (destroys A5H)
XREG EQU $46 ;X reg after break
YREG EQU $47 ;Y reg after break
STATUS EQU $48 ;P reg after break
SPNT EQU $49 ;SP after break
RNDL EQU $4E ;random counter low
RNDH EQU $4F ;random counter high
GOODF8 EQU $06 ;//e ID byte
X8 EQU $10 ;Mask for interrupt code
M8 EQU $20 ;Mask for interrupt code
EXMEMCMD EQU $38 ;Mask for extnd mem designator/sctr # cmd
CHKSMCNST EQU $AAAA ;BATTERYRAM checksum EOR constant
MNEMSTKPTR EQU $010100 ;Main stack pointer
ALEMSTKPTR EQU $010101 ;Alternate stack pointer
* Characters read by GETLN are placed in
* IN, terminated by a carriage return.
*
IN EQU $0200 ;input buffer for GETLN
OSWMSTRT EQU $3D0 ;QUITMON jumps here
BRKV EQU $03F0 ;vectors here after break
SOFTEV EQU $03F2 ;vector for warm start
PWREDUP EQU $03F4 ;THIS MUST = EOR #$A5 OF SOFTEV+1
*AMPERV EQU $03F5 ;APPLESOFT & EXIT VECTOR
USRADR EQU $03F8 ;monitor Ctrl-Y vector
NMI EQU $03FB ;NMI vector
IRQLOC EQU $03FE ;Maskable interrupt vector
LINE1 EQU $0400 ;first line of text screen
; copy hw.equates1
IOADR EQU $C000 ;All I/O is at $Cxxx
KBD EQU $C000 ;Bit 7=1 if keystroke
CLR80COL EQU $C000 ;disable 80 column store
SET80COL EQU $C001 ;enable 80 column store
RDMAINRAM EQU $C002 ;read from main 48K RAM
RDCARDRAM EQU $C003 ;read from alt. 48K RAM
WRMAINRAM EQU $C004 ;write to main 48K RAM
WRCARDRAM EQU $C005 ;write to alt. 48K RAM
SETSLOTCXROM EQU $C006 ;use ROMS on cards
SETINTCXROM EQU $C007 ;use internal ROM
SETSTDZP EQU $C008 ;use main zero page/stack
SETALTZP EQU $C009 ;use alt. zero page/stack
SETINTC3ROM EQU $C00A ;Enable internal slot 3 ROM
SETSLOTC3ROM EQU $C00B ;Enable external slot 3 ROM
CLR80VID EQU $C00C ;disable 80 column hardware
SET80VID EQU $C00D ;enable 80 column hardware
CLRALTCHAR EQU $C00E ;normal LC, flashing UC
SETALTCHAR EQU $C00F ;normal inverse, LC; no flash
KBDSTRB EQU $C010 ;turn off key pressed flag
RDLCBNK2 EQU $C011 ; DFB 0 ;Bit 7=1 if LC bank 2 is in
RDLCRAM EQU $C012 ; DFB 0 ;Bit 7=1 if LC RAM read enabled
RDRAMRD EQU $C013 ; DFB 0 ;Bit 7=1 if reading alt 48K
RDRAMWRT EQU $C014 ; DFB 0 ;Bit 7=1 if writing alt 48K
RDCXROM EQU $C015 ; DFB 0 ;Bit 7=1 if using int rom
RDALTZP EQU $C016 ; DFB 0 ;Bit 7=1 if slot zp enabled
RDC3ROM EQU $C017 ; DFB 0 ;Bit 7=1 if slot c3 space enabled
RD80COL EQU $C018 ; DFB 0 ;Bit 7=1 if 80 column store
RDVBLBAR EQU $C019 ; DFB 0 ;Bit 7=1 if not VBL
RDTEXT EQU $C01A ; DFB 0 ;Bit 7=1 if text (not graphics)
RDMIX EQU $C01B ; DFB 0 ;Bit 7=1 if mixed mode on
RDPAGE2 EQU $C01C ; DFB 0 ;Bit 7=1 if TXTPAGE2 switched in
RDHIRES EQU $C01D ; DFB 0 ;Bit 7=1 if HIRES is on
ALTCHARSET EQU $C01E ; DFB 0 ;Bit 7=1 if alternate char set in use
RD80VID EQU $C01F ; DFB 0 ;Bit 7=1 if 80 column hardware in
* $C020 ; DFB 0 ;Reserved for future system expansion
*-------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|Enable| | | | | | | |
*|color/| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
*| mono | | | | | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ MONOCOLOR Status Byte ^^^^^
* MONOCOLOR bits defined as follows
* bit 7= 0 enables color -- 1 disables color
* bit 6,5,4,3,2,1,0 Must be 0
MONOCOLOR EQU $C021 ; DFB 0 ;Monochrome/color select register
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| | | | | | | | |
*| Text Color Bits | Background Color Bits |
*| | | | | | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ TBCOLOR Byte ^^^^^
* TBCOLOR bits defined as follows
* bit 7,6,5,4 = Text color bits
* bits 3,2,1,0 = Background color bits
*
* Color bits =
* $0 = Black
* $1 = Magenta
* $2 = Dark Blue
* $3 = Purple
* $4 = Dark green
* $5 = Dark Gray
* $6 = Medium Blue
* $7 = Light Blue
* $8 = Brown
* $9 = Orange
* $A = Light Gray
* $B = Pink
* $C = Green
* $D = Yellow
* $E = Aquamarine
* $F = White
TBCOLOR EQU $C022 ; DFB 0 ;Text/background color select register
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| VGC | 1sec | Scan | Ext | | 1sec | Scan | Ext |
*| int | int | int | int |Unused| int | int | int |
*|active|active|active|active| |enable|enable|enable|
*|______|______|______|______|______|______|______|______|
* ^^^^^ VGCINT Status Byte ^^^^^
* VGCINT bits defined as follows
* bit 7= 1 if interrupt generated by VGC
* bit 6= 1 if 1 second timer interrupt
* bit 5= 1 if scan line interrupt
* bit 4= 1 if external interrupt
* bit 3= unused
* bit 2= 1 second timer interrupt enable
* bit 1= scan line interrupt enable
* bit 0= external interrupt enable
VGCINT EQU $C023 ; DFB 0 ;VGC interrupt register
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|Button| | |
*|status|Delta | Delta movement |
*| now | sign | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ MOUSEDATA Byte ^^^^^
* MOUSEDATA bits defined as follows
* bit 7= if reading X data = button 1 status
* if reading Y data = button 0 status
* bit 6= sign of delta 0='+' -- 1='-'
* bit 5,4,3,2,1,0 = delta movement
MOUSEDATA EQU $C024 ; DFB 0 ;X or Y mouse data register
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | |Update| | | | | |
*| Open |Closed| mod |Keypad|Repeat| Caps | Ctrl |Shift |
*| Apple| Apple|no key| key |active| lock | key | key |
*| key | key | press|active| |active|active|active|
*|______|______|______|______|______|______|______|______|
* ^^^^^ KEYMODREG Status Byte ^^^^^
* KEYMODREG bits defined as follows
* bit 7= Open Apple key active
* bit 6= Closed Apple key active
* bit 5= Updated modifier latch without keypress
* bit 4= Keypad key active
* bit 3= Repeat active
* bit 2= Caps lock active
* bit 1= Control key active
* bit 0= Shift key active
KEYMODREG EQU $C025 ; DFB 0 ;Key modifier register
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Data to/from keyboard micro |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ DATAREG Byte ^^^^^
* DATAREG bits defined as follows
* bit 7,6,5,4,3,2,1,0 = data to/from keyboard micro
*
* Data at interrupt time in this register is defined as
* bit 7= Response byte if set, otherwise status byte
* bit 6= ABORT valid if set and all other bits reset
* bit 5= Desktop manager key sequence pressed
* bit 4= Flush buffer key sequence pressed
* bit 3= SRQ valid if set
* bit 2,1,0 If all bits clear then no FDB data valid,
* else the bits indicate the number of valid
* bytes received minus 1. (2-8 bytes total)
DATAREG EQU $C026 ; DFB 0 ;Data register in KeyGlu chip
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| Mouse| Mouse| Data | Data | Key | Key | Mouse| Cmd |
*| reg | int | reg | int | data | int |X/Yreg| reg |
*| full |enable| full |enable| full |enable| data | full |
*|______|______|______|______|______|______|______|______|
* ^^^^^ KMSTATUS Status Byte ^^^^^
* KMSTATUS bits defined as follows
* bit 7= 1 if mouse register full
* bit 6= mouse interrupt disable/enable
* bit 5= 1 if data register full
* bit 4= data interrupt enable
* bit 3= 1 if key data full
* bit 2= key data interrupt enable
* bit 1= 0 = mouse 'X' register data available
* 1 = mouse 'Y' register data available
* bit 0= Command register full
KMSTATUS EQU $C027 ; DFB 0 ;Keyboard/mouse status register
ROMBANK EQU $C028 ; DFB 0 ;ROM bank select toggle
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|Enable|Linear| B/W | | | | |Enable|
*| super| video|Color | 0 | 0 | 0 | 0 |bank 1|
*|hi-res| |DHires| | | | |latch |
*|______|______|______|______|______|______|______|______|
* ^^^^^ NEWVIDEO Byte ^^^^^
* NEWVIDEO bits defined as follows
* bit 7= 1 to disable Apple //e video (enables super hi-res)
* bit 6= 1 to linearize for super hi-res
* bit 5= 0 for color double hi-res -- 1 for B/W hi-res
* bit 4,3,2,1= MUST be pregrammed as 0
* bit 0= Enable bank 1 latch to allow long instructions
* to access bank 1 directly.
NEWVIDEO EQU $C029 ; DFB 0 ;Video/enable read alt mem with long instr
* EQU $C02A ; DFB 0 ;Reserved for future system expansion
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| Character Generator| NTSC/| Lang | | | |
*| language select | PAL |select| 0 | 0 | 0 |
*| | | | | bit | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ LANGSEL Byte ^^^^^
* LANGSEL bits defined as follows
* bit 7,6,5= Character generator language select
* Primary language Secondary language
* $0 = USA Dvorak
* $1 = UK USA
* $2 = French USA
* $3 = Danish USA
* $4 = Spanish USA
* $5 = Italian USA
* $6 = German USA
* $7 = Swedish USA
* bit 4= 0 if NTSC video mode -- 1 if PAL video mode
* bit 3= LANGUAGE switch bit 1 if primary lang set selected
* bit 2,1,0 ;MUST be programmed as 0's
LANGSEL EQU $C02B ; DFB 0 ;Language/PAL/NTSC select register
CHARROM EQU $C02C ; DFB 0 ;Addr for tst mode read of character ROM
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|Slot7 |Slot6 |Slot5 |Slot4 | |Slot2 |Slot1 | |
*|intext|intext|intext|intext| 0 |intext|intext| 0 |
*|enable|enable|enable|enable| |enable|enable| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SLTROMSEL Byte ^^^^^
* SLTROMSEL bits defined as follows
* bit 7= 0 enables internal slot 7 -- 1 enables slot ROM
* bit 6= 0 enables internal slot 6 -- 1 enables slot ROM
* bit 5= 0 enables internal slot 5 -- 1 enables slot ROM
* bit 4= 0 enables internal slot 4 -- 1 enables slot ROM
* bit 3= MUST be 0
* bit 2= 0 enables internal slot 2 -- 1 enables slot ROM
* bit 1= 0 enables internal slot 1 -- 1 enables slot ROM
* bit 0= Must be 0
SLTROMSEL EQU $C02D ; DFB 0 ;Slot ROM select
VERTCNT EQU $C02E ; DFB 0 ;Addr for read of video cntr bits V5-VB
HORIZCNT EQU $C02F ; DFB 0 ;Addr for read of video cntr bits VA-H0
SPKR EQU $C030 ; DFB 0 ;clicks the speaker
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| 3.5" | 3.5" | | | | | | |
*| head | drive| 0 | 0 | 0 | 0 | 0 | 0 |
*|select|enable| | | | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ DISKREG Status Byte ^^^^^
* DISKREG bits defined as follows
* bit 7= 1 to select head on 3.5" drive to use
* bit 6= 1 to enable 3.5" drive
* bit 5,4,3,2,1,0= unused
DISKREG EQU $C031 ; DFB 0 ;Used for 3.5" disk drives
*-----------------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |Clear |Clear | | | | | |
*| 0 |1 sec | scan | 0 | 0 | 0 | 0 | 0 |
*| | int |ln int| | | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SCANINT Byte ^^^^^
* SCANINT bits defined as follows
* bit 7= unused
* bit 6= write a 0 here to reset 1 second interrupt
* bit 5= write a 0 here to clear scan line interrupt
* bit 4= unused
* bit 3= unused
* bit 2= unused
* bit 1= unused
* bit 0= unused
SCANINT EQU $C032 ; DFB 0 ;Scan line interrupt register
* continued in next file
; copy hw.equates2
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Clock data register |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ CLOCKDATA Byte ^^^^^
* CLOCKDATA bits defined as follows
* bit 7,6,5,4,3,2,1,0 -- Data passed to/from clock chip
CLOCKDATA equ $C033 ; DFB 0 ;Clock data register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| Clock| Read/|Chip | | |
*| xfer |Write |enable|Unused| Border Color |
*| | chip |assert| | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ CLOCKCTL Byte ^^^^^
* CLOCKCTL bits defined as follows
* bit 7= Set =1 to start transfer to clock
* Read =0 when transfer to clock is complete
* bit 6= 0= write to clock chip -- 1= read from clock chip
* bit 5= Clock chip enable asserted after transfer 0=no 1=yes
* bit 4= unused
* bit 3,2,1,0 = select border color (see TBCOLOR for values)
CLOCKCTL equ $C034 ; DFB 0 ;Clock control register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| | Stop | Stop | Stop | Stop | Stop | Stop | Stop |
*| 0 |I/O/LC|txtpg2|auxh-r|suprhr|hires2|hires1|txt pg|
*| |shadow|shadow|shadow|shadow|shadow|shadow|shadow|
*|______|______|______|______|______|______|______|______|
* ^^^^^ SHADOW Byte ^^^^^
* SHADOW bits defined as follows
* bit 7= Must write 0
* bit 6= 1 to inhibit I/O and language card operation
* bit 5= 1 to inhibit shadowing text page 2
* bit 4= 1 to inhibit shadowing aux hi-res page
* bit 3= 1 to inhibit shadowing 32k video buffer
* bit 2= 1 to inhibit shadowing hires page 2
* bit 1= 1 to inhibit shadowing hires page 1
* bit 0= 1 to inhibit shadowing text pages
*
* Note: bit 5 is only implemented in new CYA chip, if using
* FPI chip then must write 0.
SHADOW equ $C035 ; DFB 0 ;Shadow register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| Slow/|Power | |Shadow|Slot 7|Slot 6|Slot 5|Slot 4|
*| fast | Up | 0 |in all|motor |motor | motor| motor|
*| speed|Detect| | RAM |detect|detect|detect|detect|
*|______|______|______|______|______|______|______|______|
* ^^^^^ CYAREG Byte ^^^^^
* CYAREG bits defined as follows
* bit 7= 0=slow system speed -- 1=fast system speed
* bit 6= 1=cold start -- 0=warm start
* bit 5= Must write 0
* bit 4= Shadow in all RAM banks
* bit 3= Slot 7 disk motor on detect
* bit 2= Slot 6 disk motor on detect
* bit 1= Slot 5 disk motor on detect
* bit 0= Slot 4 disk motor on detect
*
* Note: bit 6 only implemented in new CYA chip, if using
* FPI chip then must always write 0.
CYAREG equ $C036 ; DFB 0 ;Speed and motor on detect
DMAREG equ $C037 ; DFB 0 ;Used during DMA as bank address
SCCBREG equ $C038 ; DFB 0 ;SCC channel B cmd register
SCCAREG equ $C039 ; DFB 0 ;SCC channel A cmd register
SCCBDATA equ $C03A ; DFB 0 ;SCC channel B data register
SCCADATA equ $c03B ; DFB 0 ;SCC channel A data register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| Busy | Auto |Access| | |
*| flag | inc | doc/ | 0 | Volume DAC |
*| |adrptr| RAM | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SOUNDCTL Byte ^^^^^
* SOUNDCTL bits defined as follows
* bit 7= 0 if not busy -- 1 if busy
* bit 6= 0=disable auto incrementing of address pointer
* 1=enable auto incrementing of address pointer
* bit 5= 0=access doc -- 1=access RAM
* bit 4= Must be 0
* bit 3,2,1,0= volume DAC $0=off $F=full volume
SOUNDCTL equ $C03c ; DFB 0 ;Sound control register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Sound data read/written |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SOUNDDATA Byte ^^^^^
* SOUNDDATA bits defined as follows
* bit 7,6,5,4,3,2,1,0 = Data read from/written to sound RAM
SOUNDDATA equ $C03d ; DFB 0 ;Sound data register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Low byte of sound address pointer |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SOUNDADRL Byte ^^^^^
* SOUNDADRL bits defined as follows
* bit 7,6,5,4,3,2,1,0 = Address into sound RAM low byte
SOUNDADRL equ $C03E ; DFB 0 ;Sound address pointer, low byte
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| High byte of sound address pointer |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ SOUNDADRH Byte ^^^^^
* SOUNDADRH bits defined as follows
* bit 7,6,5,4,3,2,1,0 = Address into sound RAM high byte
SOUNDADRH equ $C03F ; DFB 0 ;Sound address pointer, high byte
* equ $C040 ; DFB 0 ;Reserved for future system expansion
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| | | |Enable|Enable|Enable|Enable|Enable|
*| 0 | 0 | 0 |1/4sec| VBL |switch| move | mouse|
*| | | | ints | ints | ints | ints | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ INTEN Byte ^^^^^
* INTEN bits defined as follows
* bit 7= Must be 0
* bit 6= Must be 0
* bit 5= Must be 0
* bit 4= 1 to enable 1/4 second interrupts
* bit 3= 1 to enable VBL interrupts
* bit 2= 1 to enable Mega // mouse switch interrupts
* bit 1= 1 to enable Mega // mouse movement interrupts
* bit 0= 1 to enable Mega // mouse operation
INTEN equ $c041 ; DFB 0 ;Interrupt enable register
* equ $C042 ; DFB 0 ;Reserved for future system expansion
* equ $C043 ; DFB 0 ;Reserved for future system expansion
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Mega // mouse delta movement byte |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ MMDELTAX Byte ^^^^^
* MMDELTAX bits defined as follows
* bit 7,6,5,4,3,2,1,0 = delta movement in 2's complement notation
MMDELTAX equ $C044 ; DFB 0 ;Mega // mouse delta X register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| |
*| Mega // mouse delta movement byte |
*| |
*|______|______|______|______|______|______|______|______|
* ^^^^^ MMDELTAY Byte ^^^^^
* MMDELTAY bits defined as follows
* bit 7,6,5,4,3,2,1,0 = delta movement in 2's complement notation
MMDELTAY equ $C045 ; DFB 0 ;Mega // mouse delta Y register
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|Self/ |MMouse|Status|Status|Status|Status|Status|Status|
*|burnin| last | AN3 |1/4sec| VBL |switch| move |system|
*| diags|button| | int | int | int | int | IRQ |
*|______|______|______|______|______|______|______|______|
* ^^^^^ DIAGTYPE Byte ^^^^^
* DIAGTYPE bits defined as follows
* bit 7= 0 if self diagnostics get used if BUTN0=1 and BUTN1=1
* bit 7= 1 if burn-in diagnostics get used if BUTN0=1 and BUTN1=1
* bits 6-0 = same as INTFLAG
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*|MMouse|MMouse|Status|Status|Status|Status|Status|Status|
*| now | last | AN3 |1/4sec| VBL |switch| move |system|
*|button|button| | int | int | int | int | IRQ |
*|______|______|______|______|______|______|______|______|
* ^^^^^ INTFLAG Byte ^^^^^
* INTFLAG bits defined as follows
* bit 7= 1 if mouse button currently down
* bit 6= 1 if mouse button was down on last read
* bit 5= status of AN3
* bit 4= 1 if 1/4 second interrupted
* bit 3= 1 if VBL interrupted
* bit 2= 1 if Mega // mouse switch interrupted
* bit 1= 1 if Mega // mouse movement interrupted
* bit 0= 1 if system IRQ line is asserted
DIAGTYPE equ $C046 ; EQU * ;0/1 Self/burn-in diagnostics
INTFLAG equ $C046 ; DFB 0 ;Interrupt flag register
CLRVBLINT equ $C047 ; DFB 0 ;Clear the VBL and 3.75Hz interrupt flags
CLRXYINT equ $C048 ; DFB 0 ;Clear Mega // mouse interrupt flags
* equ $c049 ; DFB 0 ;Reserved for future system expansion
* equ $C04A ; DFB 0 ;Reserved for future system expansion
* equ $C04B ; DFB 0 ;Reserved for future system expansion
* equ $C04C ; DFB 0 ;Reserved for future system expansion
* equ $C04D ; DFB 0 ;Reserved for future system expansion
* equ $C04E ; DFB 0 ;Reserved for future system expansion
* equ $C04F ; DFB 0 ;Reserved for future system expansion
TXTCLR equ $C050 ; DFB 0 ;switch in graphics (not text)
TXTSET equ $C051 ; DFB 0 ;switch in text (not graphics)
MIXCLR equ $C052 ; DFB 0 ;clear mixed-mode
MIXSET equ $C053 ; DFB 0 ;set mixed-mode (4 lines text)
TXTPAGE1 equ $c054 ; DFB 0 ;switch in text page 1
TXTPAGE2 equ $C055 ; DFB 0 ;switch in text page 2
LORES equ $C056 ; DFB 0 ;low-resolution graphics
HIRES equ $c057 ; DFB 0 ;high-resolution graphics
SETAN0 equ $c058 ; DFB 0 ;Clear annunciator 0
CLRAN0 equ $c059 ; DFB 0 ;Set annunciator 0
SETAN1 equ $C05A ; DFB 0 ;Clear annunciator1
CLRAN1 equ $C05b ; DFB 0 ;Set annunciator 1
SETAN2 equ $c05c ; DFB 0 ;Clear annunciator 2
CLRAN2 equ $c05d ; DFB 0 ;Set annunciator 2
SETAN3 equ $c05e ; DFB 0 ;Clear annunciator 3
CLRAN3 equ $c05f ; DFB 0 ;Set annunciator 3
BUTN3 equ $C060 ; DFB 0 ;Read switch 3
BUTN0 equ $c061 ; DFB 0 ;open apple key
BUTN1 equ $c062 ; DFB 0 ;closed apple key
BUTN2 equ $c063 ; DFB 0 ;Read switch 2
PADDL0 equ $c064 ; DFB 0 ;Read paddle 0
* equ $C065 ; DFB 0 ;Read paddle 1
* equ $C066 ; DFB 0 ;Read paddle 2
* equ $c067 DFB 0 ;Read paddle 3
*---------------------------------------------------------------
* __7______6______5______4______3______2______1______0___
*| | | | | | | | |
*| ALZP | PAGE2| RAMRD|RAMWRT| RDROM|LCBNK2|ROMBNK| INTCX|
*|status|status|status|status|status|status|status|status|
*| | | | | | | | |
*|______|______|______|______|______|______|______|______|
* ^^^^^ STATEREG Status Byte ^^^^^
* STATEREG bits defined as follows
* bit 7= ALZP status
* bit 6= PAGE2 status
* bit 5= RAMRD status
* bit 4= RAMWRT status
* bit 3= RDROM status (Read only RAM/ROM (0/1))
* IMPORTANT NOTE:
* Do two reads to $C083 then change STATEREG
* to change LCRAM/ROM banks (0/1) and still
* have the language card write enabled.
* bit 2= LCBNK2 status 0=LC bank 0 - 1=LC bank 1
* bit 1= ROMBANK status
* bit 0= INTCXROM status
STATEREG equ $C068 ; DFB 0 ;State register
* equ $c069 ; DFB 0 ;Reserved for future system expansion
* equ $C06a ; DFB 0 ;Reserved for future system expansion
* equ $C06b ; DFB 0 ;Reserved for future system expansion
* equ $C06c ; DFB 0 ;Reserved for future system expansion
TESTREG equ $c06D ; DFB 0 ;Test mode bit register
CLRTM equ $C06E ; DFB 0 ;Clear test mode
ENTM equ $c06F ; DFB 0 ;Enable test mode
PTRIG equ $C070 ; DFB 0 ;trigger the paddles
* equ $c071 ; DS 15,0 ;ROM interrupt code jump table
* equ $c080 ; DFB 0 ;Sel LC RAM bank2 rd, wrt protect LC RAM
ROMIN equ $c081 ; DFB 0 ;Enable ROM read, 2 reads write enb LC RAM
* equ $c082 ; DFB 0 ;Enable ROM read, wrt protect LC RAM
LCBANK2 equ $c083 ; DFB 0 ;Sel LC RAM bank2, 2 rds wrt enb LC RAM
* equ $c084 ; DFB 0 ;Sel LC RAM bank2 rd, wrt protect LC RAM
* equ $c085 ; DFB 0 ;Enable ROM read, 2 reads wrt enb LC RAM
* equ $c086 ; DFB 0 ;Enable ROM read, wrt protect LC RAM
* equ $c087 ; DFB 0 ;Sel LC RAM bank2, 2 rds wrt enb LC RAM
* equ $C088 ; DFB 0 ;Sel LC RAM bank1 rd, wrt protect LC RAM
* equ $c089 ; DFB 0 ;Enable ROM read, 2 reads wrt enb LC RAM
* equ $C08A ; DFB 0 ;Enable ROM read, wrt protect LC RAM
LCBANK1 equ $c08B ; DFB 0 ;Sel LC RAM bank1, 2 rds wrt enb LC RAM
* equ $C08C ; DFB 0 ;Sel LC RAM bank1 rd, wrt protect LC RAM
* equ $c08D ; DFB 0 ;Enable ROM read, 2 reads wrt enb LC RAM
* equ $c08E ; DFB 0 ;Enable ROM read, wrt protect LC RAM
* equ $c08F ; DFB 0 ;Sel LC RAM bank1, 2 rds wrt enb LC RAM
CLRROM EQU $CFFF ;switch out $C8 ROMs
; copy equates2
BASIC EQU $E000 ;BASIC entry point
BASIC2 EQU $E003 ;BASIC warm entry point
* Permanent data in screenholes
*
* Note: these screenholes are only used by
* the 80 column firmware if an 80 column card
* is detected or if the user explicitly activates
* the firmware. If the 80 column card is not
* present, only MODE is trashed on RESET.
*
* The success of these routines rely on the
* fact that if 80 column store is on (as it
* normally is during 80 column operation), that
* text page 1 is switched in. Do not call the
* video firmware if video page 2 is switched in!!
MSLOT EQU $7F8 ;=$Cn ;n=slot using $C800
OLDCH EQU $478+3 ;LAST CH used by video firmware
MODE EQU $4F8+3 ;video firmware operating mode
OURCH EQU $578+3 ;80 column CH
OURCV EQU $5F8+3 ;80 column CV
CHAR EQU $678+3 ;character to be printed/read
XCOORD EQU $6F8+3 ;GOTOXY X-coord (pascal only)
;TEMP1 EQU $778+3 ;temp
OLDBASL EQU $778+3 ;last BASL (pascal only)
OLDBASH EQU $7F8+3 ;last BASH (pascal only)
*
*
* BASIC VMODE BITS
*
* 0....... - BASIC active
* 1....... - Pascal active
* .0...... - Print mouse chars
* .1...... - Don't print mouse characters
* ..0..... - Print control characters
* ..1..... - Don't print ctrl chars
* ...0.... -
* ...1.... -
* ....0... - Print control characters
* ....1... - Don't print ctrl chars.
* .....0.. -
* .....1.. -
* ......0. - Scroll normally
* ......1. - 1200 baud: home instead of scroll
* .......0 - Mouse text inactive
* .......1 - Mouse text active
*
M_6 EQU $40 ;
M_CTL2 EQU $20 ;Don't print controls
M_4 EQU $10 ;
M_CTL EQU $08 ;Don't print controls
M_2 EQU $04 ;
M_1 EQU $02 ;
M_MOUSE EQU $01 ;Don't print mouse chars
*
* Pascal Mode Bits
*
* 0....... - BASIC active
* 1....... - Pascal active
* .0...... - Print mouse chars
* .1...... - Don't print mouse characters
* ..0..... -
* ..1..... -
* ...0.... - Cursor always on
* ...1.... - Cursor always off
* ....0... - GOTOXY n/a
* ....1... - GOTOXY in progress
* .....0.. - Normal Video
* .....1.. - Inverse Video
* ......0. - Scroll normally
* ......1. - 1200 baud: home instead of scroll
* .......0 -
* .......1 -
*
M_PASCAL EQU $80 ;Pascal active
M_CURSOR EQU $10 ;Don't print cursor
M_GOXY EQU $08 ;GOTOXY IN PROGRESS
M_VMODE EQU $04
M_PAS1_0 EQU $02 ;Pascal 1.0 mode
; copy bank.e1.equates
BRAMBUFFER EQU $E102C0
USERPORT1 equ BRAMBUFFER ; DFB $00 ;This port is a: Printer
*DFB $00 ;Line Length: Unlimited
*DFB $00 ;Delete First LF after CR: No
*DFB $01 ;Add LF after CR: Yes
*DFB $00 ;Echo: No
*DFB $00 ;Buffering: No
*DFB $0D ;Baud: 9600
*DFB $07 ;Data/Stop Bits: 8/2
*DFB $02 ;Parity: None
*DFB $01 ;DCD Handshake: Yes
*DFB $01 ;DSR Handshake: Yes
*DFB $00 ;XON/XOFF Handshake: No
USERPORT2 equ UserPort1+12 ; DFB $01 ;This port is a: Modem
*DFB $00 ;Line Length: Unlimited
*DFB $00 ;Delete First LF after CR: No
*DFB $00 ;Add LF after CR: No
*DFB $00 ;Echo: No
*DFB $00 ;Buffering: No
*DFB $07 ;Baud: 1200
*DFB $06 ;Data/Stop Bits: 8/1
*DFB $02 ;Parity: None
*DFB $01 ;DCD Handshake: Yes
*DFB $01 ;DSR Handshake: Yes
*DFB $00 ;XON/XOFF Handshake: No
* Display selections
USERCOLOR equ UserPort2+12 ; DFB $01 ;Type: Monochrome
USERCOL equ UserColor+1 ; DFB $00 ;Columns: 40
USERTEXT equ UserCol+1 ; DFB $01 ;TEXT: (WHITE)
USERBACK equ UserText+1 ; DFB $06 ;Background: (medium blue)
USERBORDER equ UserBack+1 ; DFB $05 ;Border: (dark gray)
USERHERTZ equ UserBorder+1 ; dfb $00 ; Hertz: 60
* Sound selections
USERVOL equ UserHertz+1 ; DFB $08 ;Volume: |-------*-------|
USERBELL equ UserVol+1 ; DFB $08 ;Chimes: |-------*-------|
* Speed selections
USERSPEED equ UserBell+1 ; DFB $00 ;Speed: Normal
* Slots' selections
USERSLT1 equ UserSpeed+1 ; DFB $00 ;Slot 1: Port 1
USERSLT2 equ UserSlt1+1 ; DFB $00 ;Slot 2: Port 2
USERSLT3 equ UserSlt2+1 ; DFB $00 ;Slot 3: Text Display
* ; DFB $00 ;Slot 4: Mouse
* ; DFB $00 ;Slot 5: Smart Port
* ; DFB $00 ;Slot 6: Disk Port
USERSLT7 equ UserSlt3+4 ; DFB $01 ;Slot 7: Your Card
USERSLTST equ UserSlt7+1 ; DFB $00 ;Startup Slot: Scan
* Language selections
USERDISP equ UserSltSt+1 ; DFB $00 ;Text Display: English (U.S.)
USERLANG equ UserDisp+1 ; DFB $00 ;Keyboard: English (U.S.)
USERKBUFF equ UserLang+1 ; DFB $00 ;Keyboard Buffering: No
USERRSPD equ UserKBuff+1 ; DFB $03 ;Repeat Speed: |-------*-------|
USERRDLY equ UserRSPD+1 ; DFB $02 ;Repeat Delay: |-----*---------|
* ; DFB $02 ;Double Click: |-----*---------|
* ; DFB $02 ;Cursor Flash: |-----*---------|
USERCAPS equ UserRdly+3 ; DFB $00 ;Shift Caps/Lower Case: No
USERFSPDE equ UserCAPS+1 ; DFB $00 ;Fast Space/Delete Keys: No
USERDUAL equ UserFSpde+1 ; DFB $00 ;Dual Speed: Normal
USERHMR equ UserDual+1 ; DFB $00 ;High Mouse Resolution: No
* Clock selections
USERDATE equ UserHMR+1 ; DFB $00 ;Format: MM/DD/YY
USERAMPM equ UserDate+1 ; DFB $00 ;Format: AM-PM
* Ramdisk selections
USERMRAM equ UserAMPM+1 ; DFB $00 ;Minimum RAM for Ramdisk
USERXRAM equ UserMRam+1 ; DFB $00 ;Maximum RAM for Ramdisk
USERRSTRAM equ USERXRAM+1 ; Reset RAM disk size during next reset
LANGS equ UserXRAM+1 ; DS 9,0 ;Count/Number of languages
LAYOUTS equ Langs+9 ; DS 17,0 ;Count/Numbers of layouts
APTALKNODE equ $E102c0+$80 ; DFB 0 ;AppleTalk node number
OSVARIABLES equ ApTalkNode+1 ; DS 32,0 ;Operating system variables
BRAMSUM1 equ $E103bC ; DW 0 ;Main BATTERYRAM checksum
BRAMSUM2 equ BRAMSum1+2 ; DW 0 ;= BRAMCHKSUM1 EOR BRAMCNST
* Important vectors the user may change
* RAM space from locations $0000->$02B7 are allocated for
* monitor and RAM vectors use.
DISPATCH1 equ $E10000 ; DS 4,0 ;Jmp vector to Tool Locator1
DISPATCH2 equ Dispatch1+4 ; DS 4,0 ;Jmp vector to Tool Locator2
UDISPATCH1 equ Dispatch2+4 ; DS 4,0 ;Jmp vector to User's tool locator1
UDISPATCH2 equ UDispatch1+4 ; DS 4,0 ;Jmp vector to User's tool locator2
INTMGRV equ UDispatch2+4 ; DS 4,0 ;Jmp vector to Interrupt ma
COPMGRV EQU INTMGRV+4
ABORTMGRV EQU COPMGRV+4
SYSDMGRV EQU ABORTMGRV+4
IRQ_APTLK equ SysDMgrV+4 ; DS 4,0 ;Jmp vector to APTLK interrupt handler
IRQ_SERIAL equ IRQ_APTLK+4 ; DS 4,0 ;Jmp vector to serial port int handler
IRQ_SCAN EQU IRQ_SERIAL+4 ; DS 4,0 ;Jmp vector to scan line interrupt handler
IRQ_SOUND EQU IRQ_SCAN+4 ; DS 4,0 ;Jmp vector to sound interrupt handler
IRQ_VBL EQU IRQ_SOUND+4 ; DS 4,0 ;Jmp vector to VBL interrupt handler
IRQ_MOUSE EQU IRQ_VBL+4 ; DS 4,0 ;Jmp vector to mouse interrupt handler
IRQ_QTR EQU IRQ_MOUSE+4 ; DS 4,0 ;Jmp vector to 1/4 sec interrupt handler
IRQ_KBD EQU IRQ_QTR+4 ; DS 4,0 ;Jmp vector to keyboard interrupt handler
IRQ_RESPONSE EQU IRQ_KBD+4 ; DS 4,0 ;Jmp vctr to FDB response byte int hndlr
IRQ_SRQ EQU IRQ_RESPONSE+4 ; DS 4,0 ;Jmp vector to SRQ int handler
IRQ_DSKACC EQU IRQ_SRQ+4 ; DS 4,0 ;Jmp vector to desk accessory int handler
IRQ_FLUSH EQU IRQ_DSKACC+4 ; DS 4,0 ;Jmp vector to flush buffer int handler
IRQ_MICRO EQU IRQ_FLUSH+4 ; DS 4,0 ;Jmp vector to key micro int handler
IRQ_1SEC EQU IRQ_MICRO+4 ; DS 4,0 ;Jmp vector to 1 second interrupt handler
IRQ_EXT EQU IRQ_1SEC+4 ; DS 4,0 ;Jmp vector to EXT VGC interrupt handler
IRQ_OTHER EQU IRQ_EXT+4 ; DS 4,0 ;Jmp vector to other interrupt handler
CUPDATE EQU IRQ_OTHER+4 ; DS 4,0 ;Jmp vector to cursor update handler
IncBusyFlg equ CUPDATE+4
DecBusyFlg equ IncBusyFlg+4
BellVector equ DecBusyFlg+4 ; added 4 Dec 86
BreakVector equ BellVector+4 ...
TraceVector equ BreakVector+4 ...
StepVector equ TraceVector+4 ...
RomToolHook equ StepVector+4 ; added 4 Dec 86
TOWRITEBRAM EQU $E10080 ; DS 4,0 ;Jmp vector to write BATTERYRAM routine
TOREADBRAM EQU TOWRITEBRAM+4 ; DS 4,0 ;Jmp vector to read BATTERYRAM routine
TOWRITETIME EQU TOREADBRAM+4 ; DS 4,0 ;Jmp vector to write time routine
TOREADTIME EQU TOWRITETIME+4 ; DS 4,0 ;Jmp vector to read time routine
TOCTRL_PANEL EQU TOREADTIME+4 ; DS 4,0 ;Jmp vctr to Control Panel desk accessory
TOBRAMSETUP EQU TOCTRL_PANEL+4 ; DS 4,0 ;Jmp vector for ext Menu to setup stuff
TOPRTMSG8 EQU TOBRAMSETUP+4 ; DS 4,0 ;Jmp vector to print a msg- 8 bit entry
TOPRTMSG16 EQU TOPRTMSG8+4 ; DS 4,0 ;Jmp vector to print a msg- 16 bit entry
OSVECTORS EQU $E100A8 ; DS 24,0 ;Operating system 4 byte jump vectors
MSGPOINTER EQU OSVECTORS+24 ; DS 3,0 ;Pointer to messages table
* IRQ_SECFLAG, IRQ_INTFLAG, IRQ_DATAREG are setup
* during interrupt time. They are defined as follows
*
* IRQ_INTFLAG = value of INTFLAG read during interrupt
* processing.
* IRQ_DATAREG = value of DATAREG read during interrupt
* processing.
* IRQ_KMSTATUS value of KMSTATUS read during interrupt
* processing.
* IRQ_SECFLAG =0 if all interrupts processed by handlers
* =<>0 if any interrupt not processed by handlers
* IRQ_SERIAL1 is set up by serial interrupt manager
* for the user to read.
* IRQ_SERIAL2 is set up by serial interrupt manager
* for the user to read.
* IRQ_APTLKHI is set up by AppleTalk interrupt manager
* for the user to read.
*
* IRQ_SECFLAG, IRQ_INTFLAG, IRQ_DATAREG, IRQ_KMSTATUS are set
* to zero in irq_done2.
IRQ_INTFLAG EQU MSGPOINTER+3 ; DS 1,0 ;Status of INTFLAG at interrupt time
IRQ_DATAREG EQU IRQ_INTFLAG+1 ; DS 1,0 ;Status of DATAREG at interrupt time
IRQ_KMSTATUS EQU IRQ_DATAREG+1 ; DS 1,0 ;Status of KMSTATUS at interrupt time
IRQ_SECFLAG EQU IRQ_KMSTATUS+1 ; DS 1,0 ;0/<>0 = int not processed/processed
IRQ_SER1 EQU IRQ_SECFLAG+1 ; DS 1,0 ;Interrupt info for users
IRQ_SER2 EQU IRQ_SER1+1 ; DS 1,0 ;Interrupt info for users
IRQ_APTLKHI EQU IRQ_SER2+1 ; DS 1,0 ;Interrupt info for users
IRQ_VOLUME EQU IRQ_APTLKHI+1 ; DS 1,0 ;Volume used during interrupt time
IRQ_ACTIVE EQU IRQ_Volume+1 ; ds 1,0 ; <> 0 if called during IRQ
IRQ_SOUNDD EQU IRQ_ACTIVE+1 ; ds 1,0 ; sound register during IRQ
SIOFLAG EQU $E100CF ; DS 1,0 ;Slts enabled via init call to Misc Tl Loc
INMASK EQU SIOFLAG+1 ; DS 3,0 ;AND mask / OR mask / slot #
InSlot equ InMask
InOr equ InSlot+1
InAnd equ InOr+1
OUTMASK EQU INand+1 ; DS 3,0 ;AND mask / OR mask / slot #
OutSlot equ OutMask
OutOr equ OutSlot+1
OutAnd equ OutOr+1
ENSONIQFLG EQU OUTMASK+3 ; DS 1,0 ;0=chip installed / 1=no chip installed
IRQ_MOUSVBL EQU ENSONIQFLG+1 ; DS 1,0 ;0 if mouse not using VBL
HBPTR EQU IRQ_MOUSVBL+1 ; DS 4,0 ;Heart beat pointer to 1st item in list
TICKCNT EQU HBPTR+4 ; DS 4,0 ;Tick count updated by heart beat
MOUSESLOT EQU TICKCNT+4 ; DS 1,0 ;Mouse slot in use
EVMGRDATA EQU MOUSESLOT+1 ; DS 30,$00 ;Event manager permanent information
JournalFlag equ EVMGRDATA ; <0-play back, 0-no journal, >0-record
JournalPtr equ JournalFlag+2 ; address of journaling driver
EMBStat equ JournalPtr+4 ; mouse button status
EMXPos equ EMBStat+2 ; X position
EMYPos equ EMXPos+2 ; Y position
TaskHead equ EMYPos+2 ; RAM part of mouse card heartbeat task
; ; uses 12 bytes.
BusyFlag equ EvMgrDATA+30
SCCSTAT EQU BusyFlag+2 ; DS 1,0 ;=0 then not SCC int- <>0 then SCC int
SCCFLAG EQU SCCSTAT+1 ; DS 1,0 ;0=no ApTalk-$3C=chanA-$3B=chanB=ApTalk
SCCFLAG2 EQU SCCFLAG+1 ; DS 1,0 ;Aptalk int mask -$07=chanB-$38=chanA
SERFLAG EQU SCCFLAG2+1 ; DS 1,0 ;Ser int msk-$07=chanB-$38=chanA-$3F=both
SCC1 EQU SERFLAG+1 ; DS 1,0 ;1st data byte read in by int handler
SCC2 EQU SCC1+1 ; DS 1,0 ;2nd data byte read in by int handler
SCC3 EQU SCC2+1 ; DS 1,0 ;3rd data byte read in by int handler
* Interrupt uses all variables with 'irq_'
irq_A EQU SCC3+1 ; DS 2
irq_X EQU IRQ_A+2 ; DS 2
irq_Y equ irq_X+2 ; DS 2
irq_S equ irq_Y+2 ; DS 2
irq_D equ irq_S+2 ; DS 2
irq_P equ irq_D+2 ; DS 1
irq_DB equ irq_p+1 ; DS 1 ;irq_DB and irq_e canNOT be separated
irq_e equ irq_DB+1 ; DS 1
irq_K equ irq_e+1 ; DS 1
irq_PC equ irq_K+1 ; DS 2
irq_state equ irq_PC+2 ; DS 1
irq_shadow equ irq_state+1 ; DS 2
irq_mslot equ irq_shadow+2 ; DS 1
AVAL equ $E10120 ; DW 0 ;A register value
* ; DW 0 ;X register value
* ; DW 0 ;Y register value
SVAL equ AVAL+6 ; DW 0 ;S (stack pointer) value
DVAL equ SVAL+2 ; DW 0 ;D (direct (zero page) register) value
PVAL equ DVal+2 ; DFB 0 ;P (processor status) value
BVAL equ PVal+1 ; DFB 0 ;B (data bank register) value
KVAL equ BVal+1 ; DFB 0 ;K (program bank register) value
MVAL equ KVal+1 ; DFB 0 ;M (memory status) value
QVAL equ MVal+1 ; DFB 0 ;Q (bit7=speed - bits6-0 match shadow reg)
LVAL equ QVal+1 ; DFB 0 ;L (language card bank 0/1 selected) value
MPVAL equ LVal+1 ; DFB 0 ;m memory access mode bit value
XPVAL equ MPVal+1 ; DFB 0 ;x index mode bit value
EPVAL equ XPVal+1 ; DFB 0 ;e (emulation mode status) value
DDVAL equ EPval+1 ; DFB 0 ;d (disassembly option) value
ASCFILTER equ DDVAL+1 ; DFB 0 ;F (filter mask for ASCII input in mon)
CURSOR equ ASCFilter+1 ; DFB 0 ;Cursor
NXTCUR equ Cursor+1 ; DFB 0 ;Cursor
CHGCURFLG equ NxtCur+1 ; DFB 0 ;<>0=change cursor/ 0=no change cursor
SYSTEMSPD equ ChgCurFlg+1 ; DFB 0 ;$00=slow speed -- $80=high speed mask
SLOTSFG equ SYSTEMSPD+1 ; DFB 0 ;SLTROMSEL value for reset
;ORGMEMORY equ SystemSPD+1 ; DFB 0 ;Used in executed BRK/COP disassembly
E1PCLH equ SYSTEMSPD+1 ; DW 0 ;Program counter for 'G'o routine
GOS equ E1PCLH+2 ; DW 0 ;'S' value to return to after a 'G'o cmd
BANKS equ GOS+2 ; DFB 0 ;Source bank
BANKD equ BANKS+1 ; DFB 0 ;Destination bank
EXTENDBNK equ BANKD+1 ; DW 0 ;Extend+bank bytes that user entered
DIGITCNT equ EXTENDBNK+2 ; DFB 0 ;Used by GETNUM - how many digits entered
;TWKEY equ DigitCNT+1 ; DFB 0 ;Storage pointer for type ahead buffer
;TRKEY equ TWKey+1 ; DFB 0 ;Retrieve pointer for type ahead buffer
;TYPHED equ TRKey+1 ; DFB 0 ;Used by keyboard buffering routine
;FIXST1 equ $E10146 ; TYPHED+1 ; DW 0 ;Used by FIXSTATEREG routine
;FIXST2 equ FIXST1+2 ; DW 0 ;
;FIXST3 equ FIXST2+2 ; DW 0 ;
C1FLAG equ DIGITCNT+1 ; Serial code uses as indicator
C2FLAG equ C1FLAG+1 ; serial code uses as indicator
CURSHIFTER equ C2FLAG+1 ; Shifts to 0 which causes cursor to flash
EXTENDBNKS equ CURSHIFTER+1 ; Saved extend+bank bytes entered
IRQ_3031SOUND equ EXTENDBNKS+2 ; Jmp vector to Apple sound irqs
KEYTASKHDR0 equ $E1014C ; Key press task handler buffer, 12 BYTES
EVMKEYBUFF equ KEYTASKHDR0+12 ; 16 bytes required
WHATEVENT equ EVMKEYBUFF ; 1st byte is event number
EVMKEY equ EVMKEYBUFF+2 ; ASCII key pressed is here
RDMEMDATA equ EVMKEYBUFF+16 ; Powerup byte read from keyboard micro
TOGGLEPAT equ RDMEMDATA+1 ; Speaker ptggle ptrn for NEWBELL1 sounds
DURATION equ TOGGLEPAT+2 ; Hold time counter for NEWBELL1
PITCH equ DURATION+2 ; User chosen pitch value for NEWBELL1
VOLUME equ PITCH+2 ; Volume counter for NEWBELL1
TP2THDR equ VOLUME+1 ; Task header for text page 2 copier
TP2TCNT equ TP2THDR+4 ; VBL count
TP2TSIG equ TP2TCNT+2 ; Signature byte
TP2TJMP equ TP2TSIG+2 ; Jmp vector
TP2MODE equ TP2TJMP+4 ; 0/1 text page 2 copier off/on
ROMDAACT equ TP2MODE+1 ; 0 = Do not activate, <> = activate
NOTESEQ equ ROMDAACT+1 ; 2 bytes for note sequencer usage
ToBusyStrip equ $E10180 ; Jmp to dec busy flag
ToStrip equ $E10184 ; Jmp vector to 0ErrOut routine (X=error, Y=bytes to strip)
DefaultTPTPtr equ $E10188 ; for SetDefaultTPT (moved equate 25-Sep-90 DAL)
STEPSP equ $E1018C ;Step/Trace return address after each instruction
JSX equ STEPSP+1 ;Flag for real time execution
KEYUCVER equ JSX+1 ;KeyUc version#
ORGMEMORY equ KEYUCVER+1 ;Used in executed BRK/COP disassembly
* New locations for mouse to be used
lowabsx equ ORGMEMORY+1 ;Mouse x/y absolute position
lowabsy equ lowabsx+1 ;
highabsx equ lowabsy+1 ;
highabsy equ highabsx+1 ;
MseInfo equ highabsy+1 ;Bits 6, 7 for Y clamps
MseSpare equ MseInfo+1 ;For mouse routine usage
msestat equ MseSpare+1 ;Button 0/1 interrupt status byte
msemode equ msestat+1 ;Mode byte
MDISPATCH equ msemode+1 ;DS 4,0 for Jmp vector to monitor dispatch
MAINSIDEPATCH equ MDISPATCH+4 ;DS 4,0 for Jmp vector to main side dispatch
GUS equ MAINSIDEPATCH+4 ;DS 4,0 for gs/os scsi manager usage
ROMDEBUGGER equ GUS+4 ;ROM debugger uses for storing data bank
;-----------------------------------------------------------
;
; Location of MidiInputPoll
;
MidiInputPoll equ $E101B2
;-----------------------------------------------------------
;
; New LowLevel Toolbox vector
;
LLToolboxVector equ $E101BC ; low level patch vector for toolbox
; four bytes long.
* New $e1 vectors start from $e10200
TOMEMMOVER equ $E10200 ;DS 4,0 for Jmp vector to memory mover
BlockMoveCommandWord equ %0000100000000101 ; word means move src to dest incing one
; byte at a time.
TOSETSPEED equ TOMEMMOVER+4 ;DS 4,0 for Jmp vector to set system speed
SLTARBITER equ TOSETSPEED+4 ;DS 4,0 for Jmp vector to slot arbitration
FILL2CLAMPS equ $E102B8
LOWXCLAMP equ FILL2CLAMPS ; Low X clamp
LOWYCLAMP equ LOWXCLAMP+2 ; Low Y clamp
HIXCLAMP equ LOWYCLAMP+2 ; High X clamp
HIYCLAMP equ HIXCLAMP+2 ; High Y clamp
** $e102c0 - $e1003bf already used by battery ram buffer !!!!
ADBSCALE equ $E103D0 ; 16 bytes absolute device scale data area
TIMEOUT equ $E103E0 ; DFB 0 ;Timeout counter
CLKRDATA equ TimeOut+1 ; DS 4,0 ;Time read from clock in seconds
CLKWDATA equ ClkRData+4 ; DS 4,0 ;Time to write to clock in seconds
ASCIITIME equ ClkWData+4 ; DS 23,0 ;Time in ASCII 'mm/dd/yy hh:mm:ss am/pm'
SMARTPORTTEMP equ $E10FB0 ; 25 bytes, SmartPort uses to replace screenholes
MTHANDLE EQU $E10FD0 ; STORAGE FOR ID TAG HANDLE
KBDIRQFLAG EQU MTHANDLE+4 ; KEYBOARD INTERRUPT FLAG
* ADB buffer and variables
FILL2ADBVAR equ $E10FD6
ADBFLAGS equ FILL2ADBVAR ;ADB variables
STATUSTMP equ ADBFLAGS+1 ;Holds any pending Uc status
SRQNUM equ STATUSTMP+1 ;# of devices installed in SRQ chain
SRQCNT equ SRQNUM+1 ;Count of devices polled since last data
SRQPTR equ SRQCNT+1 ;Pointer of next device in SRQ list
SRQMRU equ SRQPTR+1 ;Most recently used device (top of list)
FILL2SERPWRUP equ $E10FFE ;
SERPWRUP equ FILL2SERPWRUP ;serial port power up byte (low)
SERPWRUP2 equ SERPWRUP+1 ;serial port power up byte (high)
FILL2ADBVCTRS equ $E1154A ;Additional ADB devices (max 16) completion vectors
ADBVCTRS equ FILL2ADBVCTRS ;DS 64,0 completion vector for each device
FILL2RAMDSKPWRUP equ $E115FF
RAMDSKPWRUP equ FILL2RAMDSKPWRUP ;<>0 if powered up before
FILL2SYSVOLLOC equ $E11DB0
SYSVOLLOC equ FILL2SYSVOLLOC ;Volume for sound tools is in hi byte
FILL2ABSCLAMPS equ $E11DD0
AbsClamps equ FILL2ABSCLAMPS ;DS 8,0 for absolute clamps value
; copy bank.ff.equates
FDBTABLE EQU $FF8000 ;Call table for front desk manager tool
SOUNDTABLE EQU $FF3E00 ;Call table for Init sound manager tool
MEMORYTABLE EQU $FF0000 ;Call table for Init memory manager tool
RAMDISKTABLE equ $FF00C0 ;Call table for the RAM disk driver tool
MAINEXIT EQU $F8D4 ;Exit point from bank 00 to calling bank
MAINSIDE EQU $F8B5 ;Entry point causes bank 00 routine to run
INITDISMGR EQU $FE0000 ;Initialize DISPATCH handler
DIAGS EQU $FF7400 ;Diagnostics start here
PROCONINIT EQU $FF5A00 ;Initialize protocol converter
MSGTBL EQU $FF8500 ;Message 'DW' table starts here
CPDEFTBL EQU $FF8EA0 ;Control Panel BRAM default table
CPDTBLLN EQU $50 ;Current default table length $50
CTRL_PANEL EQU $FF8F00 ;Control Panel desk accessory
BOOTMSG equ 0 ; DS 1 ;'I/O error!' message number
DISKMSG equ BootMsg+1 ; DS 1 ;'Not a bootable disk!' message number
DEVMSG equ DiskMsg+1 ; DS 1 ;'No device connected!' message number
CHKDEVMSG equ DevMsg+1 ; DS 1 ;'Check startup device!' message number
TIMEMSG equ ChkDevMsg+1 ; DS 1 ;'Time=' message number
STEPMSG equ TimeMsg+1 ; DS 1 ;'Step' message number
TRACEMSG equ StepMsg+1 ; DS 1 ;'Trace' message number
CBANKMSG equ TraceMsg+1 ; DS 1 ;'Cbank' message number
DECMSG equ CBankMsg+1 ; DS 1 ;'Decimal= ' message number
HEXMSG equ DecMsg+1 ; DS 1 ;'Hex= ' message number
TLERRMSG equ HexMsg+1 ; DS 1 ;'Tool error= ' message number
SYSDMSG equ TLerrMsg+1 ; DS 1 ;'Fatal system error-> ' message number
; copy pascal.equates
InitEP equ $c00D
ReadEP equ $c00E
WritEP equ $c00F
StatEP equ $c010
CtrlEP equ $c012
;=================================================
;
; Tool locator equates for bank E1
;
TPTPtr equ $E103C0 ; Ram based TPT Pointer
U_TPTPtr equ TPTPtr+4 ; Ram based User TPT Pointer
WAPTPtr equ U_TPTPtr+4 ; Pointer to Work Area Pointer Table
U_WAPTPtr equ WAPTPtr+4 ; Pointer to users ...
** DefaultTPTPtr equ $E10188 ; Pointer to default TPT (see earlier)
;-----------------------------------------------------------
;
; Public OS equates.
;
OS_Kind equ $E100BC
OS_Boot equ $E100BD
OS_Flag equ $E100BE
OS_StackEntry equ $E100B0
OS_Entry equ $E100A8
;-----------------------------------------------------------
;
; OS_Flag was originally the OS busy flag. It used only
; one bit. We now use other bits in the flag to do other
; things.
;
SpecialBit equ 1
BadOSBit equ 2
PatchLoadedBit equ 4
PatchedOnceBit equ 8
print pop