Skip to main content
Home Documents Macintosh Bits Split.Txt
Bits Split.Txt

Bits Split.Txt

Macintosh · TXT
Filenamebits_split.txt
Size0.01 MB
Subsection mac_plus / hals / 341-0522-a
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
000000000000000000000000000000000000000000
000000000000000000000100000000000000000000
000000000000000010000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000010000000000000000000000
000000000000000000000000000000000000000000
000000000000000000001000000000000000000000
000000000000000000000000000000000000000000

000000000000000100000000000000000000000000
000000000000000000000000000100000000000000
000000000000000000000000000000000000000000
000001000000000000000000000000000000000000

---1

000000000000000000100000000000000000000000
000000000000000000001000000000000000000000
000000000000010000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000001000000000000000000000000000000000000
000000000100000000000000000000000000000000

000000000000000001000000000000000000000000
000000000000000000000100000000000000000000
000000000000000000000000010000000000000000
000000000000000000000000001000000000000000

000000000000000000010000000000000000000000
000000000000001000000000000000000000000000
000100000000000000000000000000000000000000
000000000000000000000000000000000100000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000010000
000100000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000100000000000000000000000000000000000000
000000000000000000000000000100000000000000

---2

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000001000000000000000000000000000000000000
000000000100000000000000000000000000000000

000000000000000100000000000000000000000000
000000000000000000000000000100000000000000
000000000100000000000000000000000000000000
000000000001000000000000000000000000000000

000000000000000100000000000000000000000000
000000000000000000000000000000000000000000
000000000001000000000000000000000000000000
000000000000000000010000000000000000000000

000000000000000000000001000000000000000000
000000000000000000000000000000000000000000
000010000000000000000000000000000000000000
000000000001000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000001000000000000000000000000000000000000
000000000100000000000000000000000000000000

---3

000000000000000000010000000000000000000000
000000000000000100000000010000000000000000
000000000000000001000000000000000000000000
000000000000000000000100000000000000000000

000000000000000000000000010000000000000000
000000000000000000000000001000000000000000
000000000001000000000000000000000000000000
000000000000001000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000001000000000000000000000000000000
000000001000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000100000000000000000000000000000
000000000000000100000000000000000000000000

000000000000000000100000000000000000000000
000000000000000000000000000000000000000000
000000000010000000000000000000000000000000
000000000000001000000000000000000000000000

000000000000000000000000001000000000000000
000000000000000000000000000000000000000000
000000001000000000000000000000000000000000
000000000000000000010000000000000000000000

---4

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000010000000000000000000000000000000
000000000000000100000000000000000000000000

000000000000000000000000001000000000000000
000000000000000000000000000000000000000000
000000000000000000100000000000000000000000
000000000000000000000000001000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000100000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000010000000000000000000000
000000000000000000000000001000000000000000
000000000100000000000000000000000000000000
000000000001000000000000000000000000000000

000000000000001000000000000000000000000000
000000000000000000000000000100000000000000
000000000000100000000000000000000000000000
000000000000000100000000000000000000000000

000000000000000000100000000000000000000000
000000000000000000000000000000000000000000
000000000100000000000000000000000000000000
000000000000000000000000000100000000000000

---5

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000001000000000000000000000000000000
000000000000001000000000000000000000100000

000000000000000000100000000000000000000000
000000000000000000000000000000000000000000
000000000010000000000000000000000000000000
000000000000011000000000000000000000000000

000000000000000000010000000000000000000000
000000000000000000000000000000000000000000
000000000000000100000000000000000000000000
000000000000000000010000000000000000000000

000000000000000000000000000100000000000000
000000001000000000000000000000000000000000
000000000000000000010000000000000000000000
000000000000000000000000001000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000100000000000000000000000000100000
000000000000000100000000000000000000000100

000000000000000000010000000000000000000000
000000000000000000000000000100000000000000
000000001000000000000000000000000000000000
000000000000001000000000000000000000000000

---6

000000000000000000010000000000000000000000
000000000000000000000000000100000000000000
000000001000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000100000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000010000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000100000010000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000001000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000001000000000000000
000000000000000000000000000000000000000000

---7

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000001000000000000000000000000000000000
000000000010000000000000000000000000000000

000000000000000100000000000000000000000000
000000000000000000010000000000000000000000
000000000000000000000000000000000100000000
000000000000000000000000000000000000010000

000000000000000000000000000000000000000100
000000000000000000000000000000000000000000
000000000100000000000000000000000000000000
000000000000001000000000000000000000000000

000000000000000000010000000000000000000000
000000000000000000000000001000000000000000
000000000000000000000000000000001000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000100000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000001000000000000000000000000000000000
000000000000000100000000000000000000000000

---8

000000000000000000100000000000000000000000
000000000000000000000000001000000000000000
000000000000000000000000000000000000000000
000000000000001000000000000000000000000000

000000000001000000000000000000000000000000
000000000000000000000000000100000000000000
000000000000000000000000000100000000000000
000000000000001000000000000000000000000000

000000001000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000100000000000000000000000000
000000000000000000000000000100000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000100000000000000000000000000000000000000
000000000001000000000000000000000000000000

000000000000001000000000000000000000000000
000000000000000000000000000100000000000000
000000000000010000000000000000000000000000
000000000000000001000000000000000000000000

---9

000000000000000000001000000000000000000000
000000000000000000000000000000000100000000
000000000001000000000000000000000000000000
000000000000001000000000000000000000000000

000000000000000000100000000000000000000000
000000000000000000000000010000000000000000
000000000000100000000000000000000000000000
000000000000000000000000000100000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000100000000000000
000000000000000000000000000000010000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000100000000000000
000000000000001000000000000000000000000000

---10

000000000001000000000000000000000000000000
000100000000000000000000000000000000000000
000000000000010000000000000000000000000000
000000000000000001000000000000000000000000

000000000000000000001000000000000000000000
000000000000000000000000000000000000010000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000100
000000000000000000000000000100000000000000
000000000000000000000000000000000000000000
000000000000000000000000000100000000000000

000000000000000000100000000000000000000000
000000000000100000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000001000000000000000000000000000
000000000001000000000000000000000000000000
000000000000000000000000001000000000000000
000000000000000000010000000000000000000000

000000001000000000000000000000000000000000
000100000000000000000000000000000000000000
000000000001000000000000000000000000001000
000000000000000000010000000000000000000000

---

000000000000000000000000000000000000000100
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
000000000000000000000000000000000000000000

000000000000000000000000000000000000000000
000000000000000000000000000000000000000000
Home Documents Lisa Lisa Boot ROM RM248.M.TEXT
Lisa Boot ROM RM248.M.TEXT

Lisa Boot ROM RM248.M.TEXT

Lisa · TEXT
FilenameLisa_Boot_ROM_RM248.M.TEXT
Size0.09 MB
Subsection firmware
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.PAGE
;--------------------------------------------------------------------------
;  Monitor code - first displays requested icons, error codes or messages,
;  and then outputs menu of options to user and awaits input
;--------------------------------------------------------------------------

INITMON				  ;entry point for displays
        .IF  ROM4K = 0
        BSR     SAVEREGS	  ;save registers
        CLR.L   D7		  ;reset reg for error indicators
        CLR.B   STATFLGS	  ; and status flags
        BSET    #NOCONT,STATFLGS  ;set external entry indicator

INIT1
        MOVEM.L D0/A2-A3,-(SP)	  ;save incoming arguments
        BSR     DSABLDSK	  ;disable ints from both drives
        BSR     RSTKBD		  ;reset keyboard
        BSR     CLRRST		  ;and clear reset
        BSR     CursorInit	  ;init cursor and mouse
        MOVEM.L (SP)+,D0/A2-A3	  ;restore arguments

INIT2			        ;internal entry point
        .IF  DEBUG = 0
        MOVEA   #STKBASE,SP     ;reset stack pointer		        RM000
        .ENDC

        .IF  USERINT = 1
        MOVEM.L D0/A2-A3,-(SP)  ;save incoming arguments
        .ENDC
        .ENDC		        ;{ROM4K}

        BSR     SETVLTCH        ;set video latch

        .IF  USERINT = 0
        BSR     CLRSCRN	        ;go clear screen
        MOVEQ   #FIRSTROW,D5    ;set initial cursor ptrs
        MOVEQ   #FIRSTCOL,D6
        .ELSE
        BSR     DRAWDESK        ;display the desktop
        BSR     MAKEALERT       ;draw alert box (in case no icon display)

INIT3   MOVEM.L (SP)+,D0/A2     ;restore arguments

        MOVE.L  A2,D1	        ;icon display?
        BEQ.S   @0	        ;skip if no
        BSR     DSPALRTICON     ;go do icon display

@0      TST     D0	        ;error code display?
        BEQ.S   @2	        ;skip if no
        MOVE.L  A2,D1	        ;icon displayed?
        BNE.S   @1	        ;skip if yes
        MOVEQ   #MSGROW,D5      ;else display error code on same line
        MOVEQ   #CODECOL,D6     ; as error msg
        BSR     DSPDEC	        ;display as decimal #
        BRA.S   @2

@1      BSR     DSPCODE	        ;output error code under icon

@2      MOVE.L  (SP)+,A3        ;restore msg ptr
        .ENDC

        MOVE.L  A3,D0	        ;message display?
        BEQ.S   MONITOR

        .IF  USERINT = 0
        BSR     DSPMSGR	        ;go display it
        .ELSE
        BSR     DSPALRTMSG      ;go display message in alert box
        .ENDC

MONITOR			        ;entry point for no screen setup
        .IF  ROM4K = 0
        ORI     #$0700,SR       ;disable all interrupts
        BSR     SETVCTRS        ;set vectors for ROM space	        CHG028
        .ELSE
@1      NOP		        ;hang for 2716 version of ROM
        BRA.S   @1
        .ENDC

        .IF  ROM4K = 0
;---------------------------------------------------------------------------
;  Now output first level menu, prompt line and cursor.	 Do preliminary
;  check to see if CONTINUE option can be displayed.  This is the Customer
;  mode level of the monitor code.
;---------------------------------------------------------------------------

LEVEL1
        .IF  USERINT = 1
        CLR     RECTCNT	        ;clear active rectangle count
        ANDI.B  #$0F,STATFLGS   ;init flags
        BSET    #BTN,STATFLGS   ;set operating with buttons flag

        BTST    #NOCONT,STATFLGS ;display continue?
        BNE.S   OTHRBTNS        ;skip if no
        MOVE.L  STATUS,D0       ;get test status
        ANDI.L  #CONTMSK,D0     ;mask don't cares
        BNE.S   @1	        ;skip if error that disallows continuing
        TST     BOOTMEM	        ;check boot memory area for R/W errors
        BNE.S   @1	        ;skip if any errors

        MOVE    #BTN2STRT,A1    ;display CONTINUE button
        MOVE.B  #KEY2,D0        ;with alternate keycode
        LEA     CONTMSG,A3      ;and description
        MOVEA   #BTN2MSG,A2     ;and location			        RM000
        CLR.L   D1	        ;don't append '...' string
        BSR     MAKEBUTN
        BRA.S   OTHRBTNS        ;and go make other buttons
@1      BSET    #NOCONT,STATFLGS ;set indicator for no CONTINUE option

OTHRBTNS
        .ENDC

DOMENU
        .IF  USERINT = 0
        LEA     LEV1MSG,A3      ;display rest of menu line and get input
        BSR     WRTMENU
        .ELSE
        BTST    #NORSTRT,STATFLGS ;display RESTART button?
        BNE.S   @1		  ;skip if not
        MOVE    #BTN1STRT,A1	  ;else do display
        MOVE.B  #KEY1,D0
        LEA     RTRYMSG,A3
        MOVEA   #BTN1MSG,A2     ;				        RM000
        CLR.L   D1	        ;don't append '...' string
        BSR     MAKEBUTN

@1      MOVE    #BTN3STRT,A1    ;display STARTUP button
        MOVE    #KEY3,D0
        LEA     STRTMSG,A3
        MOVEA   #BTN3MSG,A2     ;				        RM000
        MOVEQ   #-1,D1	        ;append '...' string
        BSR     MAKEBUTN

;	 MOVE.L	 #KBDBFR,KBDQPTR ;init queue ptr

        BSR     CursorDisplay   ;display mouse cursor
        BSET    #CHKCMD,STATFLGS ;require user keyboard input to be prefaced
                                 ; by the CMD key
GETL1   BSR     GETINPUT        ;and go wait for input
        BCS     GETERR	        ;exit if error
        BSR     CursorHide      ;remove cursor from screen

        .ENDC


;  Check if input valid.  If invalid, beep speaker.

        CMP.B   #KEY3,D0        ;alternate boot?
        BNE.S   @2

        .IF  USERINT = 0
        LEA     DVCEMSG,A3      ;request input
        BSR     WRTBOX1
        BSR     READKEY	        ;get input
        CMP.B   #CMDKEY,D0      ;command key?
        BEQ.S   @1	        ;continue if yes
        BSR     CLRBOX	        ;else clear box
        BRA.S   GETL1XIT        ;and exit
@1      BSR     READKEY	        ;get device input

        .IF     NEWTWIG = 1
        BSR     XLATE	        ;translate to boot id and save
        .ELSE
        MOVE.B  D0,BOOTDVCE     ;save boot device keycode
        BSET    #ALTBOOT,D7     ;set alternate boot indicator
        .ENDC

        BRA     DOBOOT	        ;and go attempt boot

        .ELSE
        BSR     CLRDESK	        ;close the alert box
        BRA     BOOTMENU        ;and go display boot menu
        .ENDC

@2      BTST    #NORSTRT,STATFLGS ;RESTART button displayed?
        BNE.S   CONTCHK		  ;skip if not
        CMP.B   #KEY1,D0        ;retry?
        BNE.S   CONTCHK	        ;skip if not

DORESET
        CLR.L   D7	        ;clear error reg		        RM000
        TST.B   SETUPON	        ;turn on setup bit		        RM000
        BRA     BEGIN3	        ;and restart diags		        RM000

CONTCHK
        .IF  USERINT = 1
        BTST    #NOCONT,STATFLGS ;continue option displayed?
        BNE.S   @4	        ;skip if not
        CMP.B   #KEY2,D0        ;continue option selected?
        BNE.S   @4

;  continue from point of failure

        BSR     CLRDESK	        ;clear desktop			        CHG008
        ANDI.L  #ALTBMSK,D7     ;erase error indicators
        MOVE.L  STATUS,D0       ;get power-up status
        BTST    #MMU,D0	        ;MMU error?
        BNE     VIA2TST	        ;yes - continue from VIA tests

        ANDI.L  #BOOTMSK,D0     ;check if error that continues to boot attempt
        BEQ     BOOTCHK	        ;skip if yes
        MOVE.L  D0,-(SP)        ;else save status
        BSR     MAKETEST        ;make test window

;  do init for continue to other tests

        MOVE.B  #$70,D0	        ;turn off mouse
        BSR     COPSCMD
        MOVE.L  (SP)+,D0        ;restore status

        BTST    #VID,D0	        ;serial # error?
        BEQ.S   @1	        ;skip if not
        MOVEA   #CPUSTRT,A1     ;display CPU icon
        BSR     INVICON
        BRA     PARTST	        ;continue with parity test

@1      LSR.L   #7,D0	        ;skip other CPU errors
        TST.B   D0	        ;clock error?
        BNE     CONFIG	        ;yes - continue with config check

        LSR.L   #2,D0
        TST.B   D0	        ;RS232 error?
        BEQ.S   @2	        ;skip if not
        MOVEA   #IOSTRT,A1      ;else display I/O board icon
        BSR     INVICON
        BRA     DSKTST	        ;cont with disk test

@2      TST.B   PARON	        ;must be memory error - reenable parity
        BRA     IOTST	        ; and continue with I/O board testing

        .ENDC
@4
        .IF  USERINT = 0
        CMP.B   #CMDKEY,D0      ; command?
        BNE.S   GETL1XIT
        BSR     ReadKey	        ; go get next input
        .ENDC

        CMP.B   #SKEY,D0        ; service mode desired?
        BEQ     LEVEL2	        ; skip if yes

;  Indicate invalid by beeping speaker

GETL1XIT
        BSR     SQUAWK	        ; sorry charlie
        .IF  USERINT = 0
        BRA.S   LEVEL1	        ; go wait for another try
        .ELSE
LEV1LOOP
        BSR     CursorDisplay   ;redisplay cursor
        BRA.S   GETL1	        ;go get more input

;  Error exit - go output error and return to level 1

GETERR
        LEA     IOBRD,A2        ;get I/O board icon
        SUBA.L  A3,A3	        ;no error message
        BRA     INIT2
        .ENDC

        .ENDC		        ;{ROM4K}
        .PAGE
;-------------------------------------------------------------------------
;  Subroutine to clear video page of memory or write arbitrary long word
;  pattern to entire screen (WRTSCRN entry point).
;-------------------------------------------------------------------------

CLRSCRN CLR.L   D0	        ; write 0's for white screen
WRTSCRN			        ; entry pt for write to screen (assumes D0 set)
        MOVE.L  SCRNBASE,A0     ; get screen base address
        MOVE    #HEX8K-3,D1     ; set longs count
@1      MOVE.L  D0,(A0)+	   ; clear for video page
        DBF     D1,@1
        RTS

        .IF  ROM4K = 0
        .IF  USERINT = 0
;-------------------------------------------------------------------------
;  Subroutine to clear "dialog box" in display row 1.
;-------------------------------------------------------------------------

CLRBOX  MOVEM.L D5-D6/A0,-(SP)  ;save cursor ptrs and working reg
        MOVEQ   #1,D5	        ;clear from 1,0 to 3,0
        MOVEQ   #0,D6
        BSR     SETCRSR	        ;get address for start
        MOVE.L  A6,A0	        ;save
        MOVEQ   #2,D5	        ;get ending address  in A6
        BSR     SETCRSR
CLRIT   CLR     (A0)+	        ;do clear
        CMPA.L  A0,A6
        BNE.S   CLRIT
        MOVEM.L (SP)+,D5-D6/A0  ;restore and
        RTS		        ; exit

;-------------------------------------------------------------------------
;  Subroutine to display menu line
;-------------------------------------------------------------------------

WRTMENU MOVEM.L D5-D6,-(SP)     ;save current cursor ptrs
        CLR     D5	        ;set menu line ptrs
        MOVEQ   #5,D6
        BSR     DSPMSG
        BSR     SETCUR	        ;draw cursor
        BSR     DRWLINE	        ;and underline
        BSR     ReadKey	        ;go wait for input
        BSR     CLRCUR	        ;clear cursor
        MOVEM.L (SP)+,D5-D6
        RTS

;-------------------------------------------------------------------------
;  Draw underline subroutine
;-------------------------------------------------------------------------

DRWLINE MOVEM.L D0/D5-D6,-(SP)  ;save cursor ptrs and working reg
        ADDQ    #1,D5	        ;draw line just above next row
        MOVEQ   #0,D6
        BSR     SETCRSR	        ;get address
        SUBA.L  #180,A6	        ;decrement to bottom of last line
        MOVEQ   #45,D0	        ;set loop count
DRWIT   MOVE    #$FFFF,(A6)+    ;draw black line
        SUBQ    #1,D0
        BNE.S   DRWIT
        MOVEM.L (SP)+,D0/D5-D6  ;restore and
        RTS		        ; exit

;-------------------------------------------------------------------------
;  Subroutine to write to dialog box
;-------------------------------------------------------------------------

WRTBOX1 MOVEM.L D0/D5-D6,-(SP)  ;save D0 and current cursor ptrs
        MOVEQ   #1,D5	        ;set box 1 coordinates
        CLR.L   D6
        BSR     SETCRSR	        ;get address in A6
        MOVE    #RLONGS,D0
@1      CLR.L   (A6)+	        ;clear box
        SUBQ    #1,D0
        BNE.S   @1
        MOVEQ   #1,D6	        ;space over for neatness
        BSR     DSPMSG	        ;write msg
        BSR     DRWLINE
        MOVEM.L (SP)+,D0/D5-D6  ;restore
        RTS		        ;and exit

        .ENDC
        .PAGE
        .IF  USERINT = 0
;-------------------------------------------------------------------------
;  Subroutine to read keycode from COPS - returns down transitions in D0
;-------------------------------------------------------------------------

ReadKey
        BSR     ReadCOPS
        TST.B   D0	        ;ignore "up" transitions
        BPL.S   ReadKey
        RTS		        ;exit with data

        .ELSE
;-------------------------------------------------------------------------
;  Subroutine to read keycode from COPS - returns down transitions in D0
;-------------------------------------------------------------------------

ReadKey
        BSR     WT4INPUT
        TST.B   D0	        ;ignore "up" transitions and mouse data
        BPL.S   ReadKey
        RTS		        ;exit with data

        .ENDC

;-------------------------------------------------------------------------
;  Subroutine to beep speaker for invalid input
;-------------------------------------------------------------------------

SQUAWK  MOVEQ   #$20,D0	        ; set frequency
        MOVE    #250,D1	        ; 1/8 sec duration
        MOVEQ   #4,D2	        ; low volume
        BSR     TONE	        ; and go do it
        RTS

;-------------------------------------------------------------------------
;  Subroutine to convert keycodes to Ascii
;  Inputs:  D0 = keycode (word)
;  Outputs: D0 = Ascii (byte) or =2 if input invalid
;-------------------------------------------------------------------------

KeyToAscii
        MOVEM.L D1/A0,-(SP)     ;save regs
        LEA     AsciiTable,A0   ;keycode to ascii table
        MOVE    D0,D1	        ;keycode to convert
        ANDI    #$007F,D1       ;ensure valid
        SUBI    #32,D1	        ;decrement for table		        RM000
        BPL.S   @1	        ;skip if valid			        RM000
        MOVEQ   #2,D0	        ;else set for invalid char	        RM000
        BRA.S   @2	        ;				        RM000
@1      MOVE.B  0(A0,D1.W),D0   ;get ascii
@2      MOVEM.L (SP)+,D1/A0     ;restore
        RTS		        ;exit


        .PAGE
;-------------------------------------------------------------------------
;  Monitor level 2 (Service mode) - enables access to memory and disk
;-------------------------------------------------------------------------

LEVEL2
        .IF  USERINT = 0
        BSR     CLRSCRN	        ;clear screen
        MOVE    #$0201,CRTROW   ;set starting display ptrs
        .ELSE
        BSR     CLRDESK	        ;display the desktop

        .IF  BMENU = 0
        MOVEA   #MENULOC,A1     ;set up menu start point	        RM000
        BSR     GETROWCOL
        LEA     MENUHDG,A3      ;and display it
        BSR     DSPMSG
        SUB.W   #91,A1	        ;decrement start pt by 1 row + 1 byte
        LEA     MENUHDG,A3      ;get length of menu heading
        BSR     GETLENGTH
        ADDQ    #1,D2	        ;add an extra byte
        ANDI.B  #$FE,D2	        ;ensure its even
        MOVE    D2,D0	        ;save as width of menu heading "box"
        MOVEQ   #14,D1	        ;set height for "box"
        MOVEQ   #-1,D2	        ;set fill pattern
        BSR     INVERSE	        ;go hilite it
        .ENDC

;  make window for output, and display menu line and pull down menu

        BSR     MAKESVCW        ;output service window
DSPMENU BSR     WRTMENU

;  do final initialization and await input

        BSR     CursorDisplay   ;display cursor

;----------------------------------------------------------------------
;  Program NMI key
;
;	 MOVEQ	 #$5A,D0	 ;set / key for NMI
;	 BSR	 COPSCMD
;	 MOVEQ	 #$61,D0
;	 BSR	 COPSCMD
;----------------------------------------------------------------------

GETLEV2
        BSR     GETINPUT        ;and go await input
        BCS     GETERR	        ;exit if error
        BSR     CursorHide      ;else remove cursor from screen and go
                                ; analyze input

        .ENDC

        .IF  USERINT = 0
DSPMENU
        LEA     LEV2MSG,A3      ;output menu and get input
        BSR     WRTMENU
        .ENDC

;  Check for valid input

        CMP.B   #KEY1,D0        ; display memory?
        BEQ     DSPMEM

        CMP.B   #KEY2,D0        ; set memory?
        BEQ     SETMEM

        CMP.B   #KEY3,D0        ; call routine
        BEQ     CALLRTN

        .IF  ROM16K = 1
        CMP.B   #KEY4,D0        ; loop?
        BEQ     LOOPTST
        .ENDC

        CMP.B   #KEY5,D0        ; video adjust?
        BEQ     VIDAJST

        .IF  BURNIN = 1
        CMP.B   #KEY6,D0        ; power cycle?
        BEQ     PowerCycle
        .ENDC

        CMP.B   #KEY7,D0        ; quit?
        BNE.S   @1
        BCLR    #NORSTRT,STATFLGS ;clear no reset status flag
        CLR.L   D0		  ;set parms for level1 - no error code
        SUBA.L  A2,A2		  ;no icon display
        SUBA.L  A3,A3		  ;no message display
        BRA     INIT2		  ;and go back to level1

@1      BRA     INVALID	        ; else invalid input

        .PAGE
        .IF  USERINT = 1
;---------------------------------------------------------------------------
;  Routine to display the preliminary pull-down menu
;---------------------------------------------------------------------------

WRTMENU
        .IF  BMENU = 0
        MOVEQ   #MITEMS,D1      ;set # of items in menu
        LEA     DISPMSG,A3      ;set ptr to menu entries
        CLR     RectCnt	        ;clear active rectangle count
        ANDI.B  #$07,STATFLGS   ;init flags
        BSET    #MENU,STATFLGS  ;set working with menu flag
        MOVE.L  D1,D4	        ;save item count
        MOVEQ   #MENUWIDTH,D0   ;set menu parms
        MULU    #MENULEN,D1     ;length depends on # of items
        ADDQ    #2,D1	        ;incr for bottom border
        MOVE    #MENUSTRT,A1    ;set start point for menu "box"
        MOVE    #MENU1MSG,A2    ;display menu items
        LEA     MENUID,A4       ;ptr to id's for menu entries
        BSR     MAKEMENU        ;go do it

        .ELSE
        CLR     RectCnt	        ;clear active rectangle count
        ANDI.B  #$0F,STATFLGS   ;init flags
        MOVEQ   #MENUWIDTH,D0   ;set menu parms
        MOVEQ   #MITEMS,D1      ;set # of items in menu
        MULU    #MENULEN,D1     ;length depends on # of items
        LEA     MENUHDG,A3      ;set ptr for menu heading
        BSR.S   DSPMENUBOX      ;go display blank menu box w/ heading

        MOVEQ   #MITEMS,D4      ;set # of items in menu
        MOVE    #MENUSTRT,A1    ;set menu starting point
        MOVE    #MENU1MSG,A2    ;menu items display address
        LEA     DISPMSG,A3      ;set ptr to menu entries
        LEA     MENUID,A4       ;ptr to id's for menu entries
        BSR     MAKEMENU        ;go fill in the menu

        .ENDC		        ;{MENU}

        RTS

        .IF  BMENU = 1
;---------------------------------------------------------------------------
;  Subroutine to display blank menu box with heading
;  Inputs:
;       D0 = menu width
;       D1 = menu length
;       A3 = menu heading
;  Outputs:
;       None
;  Side Effects:
;       D2/A1,A3 trashed
;---------------------------------------------------------------------------

DSPMENUBOX
        MOVEM.L D0-D1,-(SP)     ;save regs
        BSET    #MENU,STATFLGS  ;set working with menu flag
        BSR     CLRMENU	        ;first clear the menu bar
        ADDQ    #2,D1	        ;bump length for bottom border
        MOVE    #MENUSTRT,A1    ;set menu starting point
        BSR     MAKEBOX	        ;display the box
        MOVEA   #MENULOC,A1     ;set up menu heading display point
        BSR     GETROWCOL       ;convert to screen ptrs

        CLR.L   D1	        ;don't display '...' string
        BSR     DSPSTRING       ;display the title
        SUBA.L  A2,A3	        ;get…

Showing first 20,000 characters of 90,901 total. Open the full document →

Home Documents Lisa SEEK.Text
SEEK.Text

SEEK.Text

Lisa · TEXT
FilenameSEEK.Text
Size0.00 MB
Subsection firmware / ROM88
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;		Seek
;--
;
; REGISTERS
;  OUT
;	All =	Destroyed
;
; CALLS
;
;++
.Page


Seek	.Equ *
	Jsr	Init			; Global setup routine & return w/ 'a' = 0
	Jsr	CmdClnUp			; Clear GoByte and ErrStat

SeekAlt	.Equ *				; Alternate entry w/o 'init' of variables
	Ldx	#00
	Stx	TrkFlg			; Assume no head movement & motor already on
	Stx	MtrFlg
	Stx	Direct			; Assume '0' (toward spindle) direction
	Dex
	Stx	HostSeek			; Tell 68K that I am seeking

	Lda	MtrOn			; if = 'FF' then motor is already on
	Bne	$20
	Dec	MtrFlg			; tell me to wait full 400 msec
	Jsr	TrnMtrOn			; turn the motor on

$20	Lda	IIob+Track
	Cmp	CurTrack
	Bne	Seek1			; Wrong track
	Lda	MtrFlg
	Beq	SeekEnd			; same track and motor already on so select side
	Bne	JstMtr			; Just wait for motor to settle

Seek1	.Equ *				; 'A' has IIob+Track already
	Dec	TrkFlg			; Indicate that needs head positioning
	Sec
	Sbc	CurTrack			; Abs(destination-current) = amt to move
	Bcs	pstv			; If ccC = 1 then positive result
	Eor	#0FF
	Adc	#1			; Take two's complement
	Inc	Direct			; Set outward direction (away from spindle)

pstv	.Equ *
	Sta	StpAmt
	Lda	HeaDelay			; Assume only wait forf head settling
	Sta	Delay

Seek2	.Equ *
	Jsr	TrkClss			; Return w/ 'Y' = class of IIob+Track
	Cpy	CurClass
	Beq	$60
	Jsr	SetSpdy			; Set the speed w/ 'Y' = trk class index
	Lda	StpAmt
	Jsr	ClcScDly			; Calc speed change delay time, return in 'A'
	Sta	Delay
$60	Jsr	DoSeek			; Finally do the actual seek

JstMtr	Lda	MOnDly
	Ldx	MtrFlg
	Bne	$80
	Lda	Delay
$80	Jsr	Wait			; Wait for motor, speed change, & head settling
	Lda	IIob+Track
	Sta	CurTrack
	Jsr	SpdChk			; Check the speed & adjust if neccessary
SeekEnd	.Equ *
	Jsr	TrnMtrOn			; For flakey PAL problems
	Ldx	#0
	Stx	HostSeek			; No more seeking
	Jmp	SelSide			; Select proper side

;++
;
;		ProgErr
;
; This code will do many things.  It will either deselect the drive, turn off
; the motors, park the heads first, clear the GoByte, and ErrStat, and maybe
; jump to itself forever.
;
;
; REGISTERS
;  IN
;	A =	Any value
;	X =	Any value
;	Y =	Any value
;  OUT
;	ALL =	Destroyed
;
;--

ESAD	.Equ *				; Used by drop dead command
	Jsr	PrkClr0			; Turn off motor and clear the GoByte
ProgErr1	Jmp	ProgErr1			; Loop forever!
PrkClr0	.Equ *				; Park the heads and clear the GoByte
	Jsr	MtrOff
	Lda	#00
	Jmp	CmdClnUp
Home Documents Lisa RECAL.Text
RECAL.Text

RECAL.Text

Lisa · TEXT
FilenameRECAL.Text
Size0.00 MB
Subsection firmware / ROM88
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
ClcScDly	.Equ *
	Cmp	#13
	Bcs	$43			; If 'a' >= 13 then only wait for head settling
	Tay				; Save the number of steps
	Lda	#0			; ccC already = '0'
$31	Adc	#2			; Use 10 msec/Step instead of 12 msec
	Dey
	Bne	$31
	Sta	Temp1
	Lda	ScDly
	Sec
	Sbc	Temp1
	Bcs	$65			; If ccC=1 then result is positive
$43	Lda	HeaDelay			; Assume only wait for head settling
	Rts
$65	Cmp	HeaDelay			; See if head settling time is also included
	Bcc	$43
	Rts

;++
;		Recalbrt
;--
RecalMtr	.Equ *
	Lda	MtrOn
	Bne	Recall			; If motor is not on then turn it on & wait 400ms
	Jsr	TMOn

Recalbrt	.Equ *				; Entry point for Recalbrt
Recall	.Equ *
	Ldy	#0
	Sty	CurTrack
	Jsr	SetSpdy			; Set CurClass to '0' also
	Dey
	Sty	HostSeek			; Tell 68K that I am seeking
	Ldx	#Inward
	Jsr	SetDrctX
	Ldx	#RclStep
	Stx	Temp3			; 3 steps awau from track 00 for bad power supply
$06	Jsr	DoStep			; step away from track 0
	Dec	Temp3
	Bne	$06			; Loop 2 times for 3 total steps
	Lda	#TurnRnd			; Must wait for stepper to come to it's senses
	Jsr	Wait

	Ldx	#TmOutRcl
	Stx	Temp3			; Timeout if unable to leave track 0 being true
$17	Jsr	ReadIndx			; Read track 0 line
	Bcs	$21			; If ccC = 1 then /Trk00 is false
	Jsr	DoStep			; Step away from track 00 ( direction is already set )
	Dec	Temp3			; Maximum of 80 steps
	Bne	$17			; Loop while less than 80 steps
	Beq	$72			; Abort upon underflow

$21	Ldx	#Outward
	Jsr	SetDrctX			; Seek away from spindle toward Track 00
	Stx	Temp2
$43	Dec	Temp2			; For each step save a counter
	Beq	$78			; Abort upon underflow
	Jsr	DoStep
	Jsr	ReadIndx
	Bcs	$43
	Lda	#TmOutRcl
	Sbc	Temp2			; Result will be positive & = number of steps
	Jsr	ClcScDly			; Calc speed change delay time, return in 'A'
	Jsr	Wait			; Now wait for about 150 ms
	Jsr	SpdChk			; Check/Adjust the speed at track 0 & return error
$68	Ldx	#0
	Stx	HostSeek			; Done seeking
	Rts

$72	Lda	#DErrTk0			; Unable to leave track 0 behind
	Bne	$82

$78	Lda	#DErrCal			; Timeout during recal constant
$82	Sta	Iob+DrvError
	Sec
	Bcs	$68

.Page

ClpEnty	.Equ *				; Entry point used by clamp command
Clamp	.Equ *				; Entry point for clamp
	Rts
.Page
;++
;
;		uSWait
;
; ****
; *  The followig codes assume
; *  a cycle time of 0.5 uSec
; ****
;
; Delays a specified number of 100 uSec intervals for timing purposes
; a call to uSWait takes E X A C T L Y (A-reg * 100 uSec) to complete,
; including the Jsr-Rts, therefore the following code takes 301 uSec to
; execute:
;	Lda	#3		  1 uSec (  2 Cycles)
;	Jsr	uSWait		300 uSec (600 Cycles)
;
;--
;
; REGISTERS
;  IN
;	A =	Number of 100 uSec intervals to delay
;	X =	Any value
;	Y =	Any value
;  OUT
;	A =	Destroyed
;	X =	Destroyed
;	Y =	Unchanged
;--

WaitAlt	.Equ *				; Alternate entry point fo DoStep
	Lda	StpDly			; Load delay time

uSWait	.Equ *				; Entry point for uSWait
	Ldx	#023			; (2)
uSWait1	Dex				; (2)
	Bne	uSWait1			; (3,2)
	Ldx	#026			; (2)
	Nop				; (2)
	Sec				; (2)
	Sbc	#001			; (2)
	Bne	uSWait1			; (3,2)
	Nop				; (2)
	Rts				; (6)

.Page
;++
;
;			Wait
;
;  Wait A-reg times 5 miliseconds
;
;--
;
; REGISTERS
;  IN
:	A =	Number of 5 msec intervals to wait
;	X =	Any value
;	Y =	Any value
;  OUT
;	A =	Destroyed
;	X =	Destroyed
;	Y =	'0'
;
; CALLS
;	uSWait	Wait A-reg number of 100 uSec intervals
;--

Wait	.Equ *				; Entry point for wait
	Tay
Wait1	Lda	#50.			; Call uSWait for 50*100 = 5000 uSec
	Jsr	uSWait
	Dey
	Bne	Wait1
	Rts
Home Documents Lisa PRENIB.Text
PRENIB.Text

PRENIB.Text

Lisa · TEXT
FilenamePRENIB.Text
Size0.00 MB
Subsection firmware / ROM88
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;
;		New PreNibble routine
;	This routine will create 5 bytes ( 4 from the 524 byte i/o buffer and
;	one from the checksum ) and will save them in the zero page for use
;	during the writing operation.  It is a brute force operation, reading
;	will call a routine that will combine theh top 2 bits of each into
;	one byte that is returned within the 'A' register.
;
;	Buffer[1] == >AAAAAAAA<
;	Buffer[2] == >BBBBBBBB<
;	Buffer[3] == >CCCCCCCC<
;	Result :=  Nibl[00AABBCC]
;--
;
;	REGISTERS
;		ALL == DESTROYED
;
;	Local Equates
;--

C1BTo1	.Equ 02FF
C1BTo2	.Equ 0300
C1BTo3	.Equ 0301

C2BTo1	.Equ 03FE
C2bTo2	.Equ 03FF

;++
;	Global Equates
;		CkSum1
;		CkSum2
;		CkSum3
;		CpCkSum
;		CpBy01
;		CpBy02
;--
.Page
PreNib	.Equ *				; Entry point for all callers
	Ldy	C1BTo1
	Ldx	C1BTo2
	Lda	C1BTo3
	Jsr	Fr3To1
	Sta	CpBy01			; Save the new composite byte

	Ldy	C2BTo1
	Ldx	C2BTo2
	Lda	#00			; Only two bytes in this one
	Jsr	FrTo1
	Sta	CpBy02			; Save the new composite byte

	Ldy	CkSum1
	Ldx	CkSum2
	Lda	CkSum3
	Jsr	Fr3To1
	Sta	CpCkSum
	Rts				; Back to the caller
Home Documents Lisa READ.TEXT
READ.TEXT

READ.TEXT

Lisa · TEXT
FilenameREAD.TEXT
Size0.00 MB
Subsection firmware / ROM88
Downloads2
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;
;		Read
;
; Read will read a sector from Drive/Side/Track/Sector, doing offtrack
; stepping if neccessary to find the data.  It will also verify the
; checksum found if commanded to do so.
;
; REGISTERS
;  IN
;	All =	Any value
;  OUT
;	All =	Destroyed
;
; CALLS
;	Seek	Seeks to Drive/Track/Side
;	RdAdr	Read address header field
;	Read16	Reads data and checksum
;	VfyCkSum	Verifies checksum that was read
;	BadAddr	Handles all errors during read
;++

ReadBf	.Equ *				; Read w/o checksum verify entry point
	Lda	#0FF
	Bne	Read01

Read	.Equ *
	Lda	#00
Read01	Sta	RwCsmFlg			; Save in global flag
	Jsr	Seek			; Seek to track, zero error cnts, init retry
Read1	Jsr	RdAdr			; Find Sector
	Bcs	Read3			; Error, go and check it
	Jsr	Read16			; Read the sector
	Bcs	Read3
	Ldx	RwCsmFlg			; Fetch the checksum flag
	Bne	Read4			; If <> 0 then ignore checksum verify
	Jsr	VfyCkSum			; Verify the checksum
	Bcc	Read4			; If carry clear, then all is fine
	Inc	CSError			; Increment the checksum error counter

Read3	Jsr	BadAddr			; Find out what went wrong ( ccC = 1)
	Bcc	Read1			; Try once more
	Lda	#SErrRd			; No goog, signal read error
Read4	Rts
.Page
;++
;		BadAddr
;--
;
; REGISTERS
;  IN
;	All =	Any value
;  OUT
;	All =	Destroyed
;	Carry =	Retry status (=Clear, don't retry; =Set, please retry)
;
; CALLS
;	Recalbrt	Recalibrate the drive
;	SeekAlt	Seek to Track/Side
;--
.Page
BadAddr	.Equ *				; Entry point of BadAddr (ccC =1)
	Dec	RetryCnt			; If we've tried enough times to find data
	Beq	BadAddr2
	Clc
	Lda	RaStrt			; Or we can't find start bitslip
	Adc	RaTrk			; Or we're on the wrong trk
	Beq	BadGood			; Try again
	Cmp	RecalCnt			; if >= recalibration count then abort
	Beq	BadBad			; ccC = 1 when A = memory
	Cmp	RtyFlg			; See if new RaStrt or RaTrk error
	Beq	BadGood			; If equal then no change from last time
	Sta	RtyFlg			; a change -- save new error count
	Bne	BadAddr4			; Recalibrate head location
BadAddrd2	Dec	RecalCnt
	Beq	BadBad			; abort upon timeout (ccC still = 1)

BadAddr4	Jsr	Recalbrt			; But don't bother with spd errors at this time
	Jsr	SeekAlt			; And get back to where we were on target track
	Lda	MaxRetry			; Pick up fresh maximum number of retrys count
	Sta	RetryCnt			; and refresh the counter
BadGood	Clc				; We're trying again mate!
BadBad	Rts
Home Documents Lisa LOOP.Text
LOOP.Text

LOOP.Text

Lisa · TEXT
FilenameLOOP.Text
Size0.01 MB
Subsection firmware / ROM88
Downloads3
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;
;			RESTART
;
; Restart is the entry point after a reest to the 6504.  This is also reffered
; to as a cold start.  It will first wait for memory to be valid, then it will
; setup the stack, reset the drives, clear all of the used RAM, transfer all
; "soft" parameters from the ROM to the RAM, initialize all timing constants,
; Check for Disk In Place and clamp any disks that are there, raise the DISK
; DIAG line and then finally look for a command.
;
;--
;
; REGISTERS
;  In
;	Random values assumed
;  Out
;	All Destroyed
;++
.Page
;++

Restart	.Equ *				; Main entry point for the 6504 from reset

;	Clear decimal mode;
;	Disable interrupts to the 6504;
;	Switch off interrupt to the 68K;
;	Set stack pointer to 0B0;
;	Enable MEMPOY for 68K

	Cld				; Clear decimal mode
	Sei				; Mask off interrupts
					; Following 3 steps needed only for warm restart
DnWhWt	Sta	BootL			; Tell host I'm not ready yet
	Sta	FDirL			; Set FDir Low, no interrupt yet to the 68K
	Sta	DisL			; Enable 68K to read memory
	Ldx	#StackSt
	Txs				; Set stack to grow down from 01CF
	Jsr	HardInit			; Initialize hardware -- PWM, IWM, Latches
	Jsr	RomTest			; Will never return if error is found
	Jsr	RamTest			; currently an Rts
	Lda	#00
	Jsr	Wait			; Wait for Sony to power up -- about 1.25 second

;	For x:=#LstUsed DOWNTO 000 DO			Reset variable memory for 6504
;	   Mmemory,x := 000;			This resets all counters to 000

	Ldx	#LstUsed			; Length of variable area
	Lda	#00			; something to clear with
Restart1	Sta	GoByte,x			; Init to 0
	Dex
	Bne	Restart1
	Sta	GoByte			; and do the last/first byte

;	For x:=sharesz down to 0 do			Initialize shared variables
;	   ShareRam,x := ShareRom,x;

	Ldx	#SharesZ			; Length of shared variable space
Restart2	Lda	ShareRom,X		; Move Bytes from Rom
	Sta	ShareRam,X		; and into RAM
	Dex				; Next Byte
	Bpl	Restart2			; Done yet?

	Ldx	#4			; move 5 bytes, zero based
Xfer1	Lda	SavAdr,x
	Sta	AdrMk1,x			; initialize Address mark table
	Lda	SavDat,x
	Sta	DatMk1,x			; initialize Data mark table
	Dex
	Bpl	Xfer1

	Dec	KOff
	Ldx	#CmdLength
	Stx	CmdX			; Index for command saving
	Ldx	#SavIndex
	Stx	SaveL

	Lda	MaxDDly
	Sta	WtHih
	Bne	Loop1			; Must see if a disk is inserted

;	*** NOTE *** Loop must be the very next routine
.Page

;++
;
;			LOOP
;
; This is the main 'idle' loop where the 6504 spends most of its time when not
; doing anything useful.  The main functions of the 'LOOP' is to shut off the
; motors after they have been used, sample the DIP and BUTTON when needed,
; and look for commands from the 68K.
;
; REGISTERS
;  In
;	A =	Any value
;	X =	Any value
;	Y =	Any value
;  Out
;	Loop never exits, only calls other procedures
;
; CALLS
;	GetDIP	Get the DIP status
;	Trnrk	Park the heads and turn off the motors
;	Cmd	Interprets, syntax checks, and dispatches all commands
;
;++
.Page

;++
;	Decrement 3 byte counter.  When all 3 bytes = 0 then turn motors off
;	( even if they are already off ), & look for disk in place
;--

Loop	.Equ *			; Start of main loop
	Inc	ImAlive
	Dec	WtLow		; Decremnent low byte of motor off wait
	Bne	Loop2
	Dec	WtMid		; Decrement Middle byte
	Bne	Loop2
Loop1	.Equ *			; Entry point for immediate check of DIP
	Jsr	GetDIP		; Time to make some noise and get some status
	Dec	WtHih		; Decrement high byte
	Bne	Loop2
	Jsr	TrMtOff		; turn off motor and reset motor on flag to zero
	Lda	MaxDDly
	Sta	WithHih

Loop2	Lda	Iob+GoByte
	Bpl	Loop
	Jsr	Cmd		; Try to execute the command
	Jmp	Loop		; Go back to the loop ands spin some more

.Page
;++
;		ROMTest
;--

RomTest	.Equ *			; Entry point to test checksum of Eprom
	Rts
	Lda	#0
	Tay
	Sta	RangeL
	Sta	RangeH
	Sta	InxPtrL
	Lda	#10
	Sta	InxPtrH
	Tax
$21	Clc
	Iny			; y = +1
	Lda	RangeL
	Adc	@InxPtr,y		; This should be (InxPtr),y   ARS 12 JAN 89
	Sta	RangeL
	Dey			; y = +0
	Lda	RangeH
	Adc	@InxPtr,y
	Sta	RangeH
	Clc
	Bpl	$43
	Sec
$43	Rol	RangeH
	Rol	RangeH
	Iny
	Iny			; Y = +2
	Bne	$21
	Lda	RangeL
	Bne	RomErr
	Lda	RangeH
	Beq	RamTest
RomErr	Sta	Iob+DrvError
	Sta	DisL		; Enable 68K to read memory
	Sta	BootH		; And reset flag line also
	Jmp	ProgErr1		; Bad Eprom -- tell host & loop forever

RamTest	.Equ *			; Test for bar Ram
	Rts

;++
;
;			GetDIP
;
; REGISTERS
;
;	All are destroyed
;
; CALLS
;	UpdInt	Updates interrupt status and raises FDir if needed
;	ReadDIP	Read DIP status
;	EnblTest	Test IMsk	against x-reg if drive is enabled
; Note:
;	Should code ever get modified for a two drive system, this should
; be re-written to alow commands to be received during the one second wait
;++
.Page

GetDIP	.Equ *				; Entry point for GetDIP
	Lda	DrvConn
	Bne	$40			; if <> 0 then drive is connected
	Jsr	ChkDrv			; check for drive connected & number of sides
	Bcs	GetDip5			; Exit if still no drive connected
$40	Sta	BootL			; Set flag to tell host I'm busy
	Jsr	ReadDIP			; Read the status of the DIP into carry
	Bcs	GetDIP4			; ccC = 1 ==> no DIP -- clear Clamped Disk Flag
	Lda	Clamped			; Already a clamped disk?
	Bne	GetDIP5			; No, need to clamp if not already clamped

	Lda	#OneSec			; One second wait constant
	Jsr	Wait			; Wait for Sony drive to return to it's senses
	Jsr	ReCalMtr			; Turn on motor & make sure head is at track 0
	Dec	Clamped			; Set clamped falg to 'FF'

	Jsr	EnablTest			; If drive enabled then tell host disk inserted
	Bcc	GetDIP5			; If carry set then disk enabled

	Lda	#010			; use drive 80
GetDIP2	Ora	Ist			; Combine with current Ist
	Sta	Ist
	Bne	GetDIP5

GetDIP3	.Equ *

GetDip4	Lda	#00
	Sta	Clamped			; Tell me no disk is clamped

GetDIP5	.Equ *				; Fall through and test for button pressed
	Sta	BootH			; Clear busy flag to host
					; Fall thru & update interrupt to host ( maybe )

.Page

UpdInt	.Equ *				; Entry point for UpdInt

; Ist.7 := Ist.6 or Ist.5 or Ist.4;

	Lda	Ist
	And	#070
	Beq	UpdInt2			; Skip if none is on
	Ora	#080			; Set bit 7 if any bit is on
	Sta	Ist			; And put back into Ist

; if (Ist.7 and Imsk.7) then
;    FDir := High
; Else
;    FDir := Low
; Return from UpdInt

UpdInt2	And	Imsk			; Now test against the mask
	Sta	OkToGo			; Remember if an interrupt is pending
	Beq	UpdInt3			; Skip if no interrupt is pending
	Sta	FDirH			; Raise interrupt
	Rts
UpdInt3	Sta	FDirL			; Clear interrupt
	Rts
Home Documents Lisa NREAD16.Text
NREAD16.Text

NREAD16.Text

Lisa · TEXT
FilenameNREAD16.Text
Size0.00 MB
Subsection firmware / ROM88
Downloads3
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
.Page
;++
;
;		NRead16
;
;	NRead16 assumes that the disk is spinning at the proper speed
; and the head is located at the proper Side/Track and that the header
; for the sector desired has already been found.  First it will read in
; the beginning data marks, then the data, and finally the trailing data
; bytes.  It will abort if the proper starting or ending sequence of
; data bytes is not found.
;
; REGISTERS
;  IN
;	All =	Any value
;  OUT
;	All =	Destroyed
;
;--

.Org	1800
.Page
Read16	.Equ *
	Jsr	SetRMode			; Setup PAL on Sony to read mode
	Jsr	RDSynTop			; Read the sync nibbles
	Bcc	$03			; If bitslip marks found then carry = 0
	Rts
$03	Ldy	#0F4			; 2	15	First time only 12 bytes
RdBF01	.Equ *
	Inc	InxPtrH			; 5	28	Point to next page
RdBF02	.Equ *
	Ldx	Q7L			; 4
	Bpl	RdBF02			; 2,3
	Lda	DNibl,x			; 4	10	Map from 8 bits ==> 6 bits
	Asl	A			; 2	12
	Asl	A			; 2	14
	Tax				; 2	16	Save temporarily
	Asl	A			; 2	18
	Asl	A			; 2	20
	Sta	Temp1			; 3	23	>BBCC0000<
	Txa				; 2	25
	And	#0C0			; 2	27	>AA000000<

$10	Ldx	Q7l			; 4		Read low bits of byte A
	Bpl	$10			; 2,3
	Ora	DNibl,x			; 4	10	Combine low and high bits
	Sta	@InxPtrL,y		; 6	16
	Lda	Temp1			; 3	19	>BBCC0000<
	Iny				; 2	21
	Bne	$20			; 2,3	23/24
	Inc	InxPtrH			; 5	28	Point to next page

$20	Ldx	Q7L			; 4		Read low bits of byte B
	Bpl	$20			; 2,3
	And	#0C0			; 2	8	>BB000000<
	Ora	DNibl,x			; 4	12	Add low & high bits
	Sta	@InxPtr,y			; 6	18
	Iny				; 2	20
	Beq	RdCSM01			; 2/3	22/23
	Lda	Temp1			; 3	24	>BBCC0000<
	Asl	A			; 2	26
	Asl	A			; 2	28

$30	Ldx	Q7L			; 4		Read low bits of byte C
	Bpl	$30			; 2,3
	And	#0C0			; 2	8	>CC000000<
	Ora	@DNibl,x			; 4	12	Add low and high bits
	Sta	@InxPtr,y			; 6	18
	Iny				; 2	20
	Beq	RdBF01			; 2/3	22/23	Inc to next page if = 0
	Bne	RdBF02			; 3	25	Branch always taken

.Page
RdCSM01	.Equ *				;		Read 4 bytes of checksum
	Ldx	Q7L			; 4
	Bpl	RdSCM01			; 2,3
	Lda	DNibl,x			; 4	10	Map from 8 bits ==> 6 bits
	Asl	A			; 2	12
	Asl	A			; 2	14
	Tay				; 2	16	>AABBCC00<
	And	#0C0			; 2	18	>AA000000<

$10	Ldx	Q7L			; 4		Read low bits of byte A
	Bpl	$10			; 2,3
	Ora	Dnibl,x			; 4	10	Add low and high bits
	Sta	Cksum1			; 3	13
	Tya				; 2	15
	Asl	A			; 2	17
	Asl	A			; 2	19
	Tay				; 2	21	>BBCC0000<
	And	#0C0			; 2	23	>BB000000<

$20	Ldx	Q7L			; 4		Read low bits of byte B
	Bpl	$20			; 2,3
	Ora	DNibl,x			; 4	10	Add high and low bits
	Sta	Cksum2			; 3	13
	Tya				; 5	15
	Asl	A			; 2	17
	Asl	A			; 2	19	>CC000000<

$30	Ldx	Q7L			; 4		Read low bits of byte C
	Bpl	$30			; 2,3
	Ora	DNibl,x			; 4	10	Combine low and high bits
	Sta	Cksum3			; 3	13

Rd9	Lda	Q7L			; 4		Check bitslip mark 1
	Bpl	Rd9			; 2,3
	Cmp	DatMk4			; 3
	Bne	BSErr			; 2,3

Rd10	Lda	Q7L			; 4		Check bitslip mark 2
	Bpl	Rd10			; 2,3
	Cmp	DatMk5			; 3
	Bne	BSErr			; 2,3
	Clc
RdExit	Lda	Q6H			;		Sense mode
RdWaste	Rts

.Page
BSErr	Inc	BSCnt			; Trailing bitslip mark & error counter
	Sec
	Bcs	RdExit			; Return to Sense mode & exit


CSErr	Inc	CsErr			; Checksum error counter
RdErr	Sec
	Bcs	RdExit

RdErr2	Inc	StSlp			; Starting bitslip error count
	Sec
	Bcs	RdExit

RdSynTop	.Equ *				; Starting to read starting bitslip marks
	Lda	Q6L			; Subroutine to read starting bitslip marks
	Ldx	#000			; Switch from sense to read mode
	Ldy	#NiblRetr			; No. of retries allowed for bitslip read
RSync	Dey
	Beq	RdErr2

RS1	Lda	Q7L			; 4
	Bpl	RS1			; 2,3	6
RSync1	Cmp	DatMk1			; 3	9	Data mark 1
	Bne	RSync			; 2,3	11,12

	Stx	InxptrL			; 3	14
RS2	Lda	Q7L			; 4
	Bpl	RS2			; 2,3	6
	Cmp	DatMk2			; 3	9	Data mark 2
	Bne	RSync1			; 2,3	11,12

	Stx	InxptrH			; 3	14
RS3	Lda	Q7L			; 4
	Bpl	RS3			; 2,3	6
	Cmp	DatMk3			; 3	9	Data mark 3
	Bne	RSync1			; 2,3	11,12
	Clc				; 2	13

RS4	Lda	Q7l			; 4		Read sector number ( unchecked )
	Bpl	RS4			; 2,3	6
	Rts				;		Back to caller
Home Documents ADB Device List.Md
Device List.Md

Device List.Md

ADB · MD
Filenamedevice_list.md
Size0.01 MB
Subsection tashnotes_adb
Downloads8
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
# ADB Device List

This is an obviously-incomplete list of known ADB devices and their identifying information (default address and handler ID).

## License Dongles

Original Address 0x1

| Address | Handler ID | Make                 | Model Name    | Model Number | Description    |
| ------- | ---------- | -------------------- | ------------- | ------------ | -------------- |
| 0x1     | 0x34       | Rainbow Technologies | Sentinel Eve3 |              | License dongle |

## Encoded Devices

Original Address 0x2

| Handler ID    | Make  | Model Name                         | Model Number | Description |
| ------------- | ----- | ---------------------------------- | ------------ | ----------- |
| 0x01          | Apple | Keyboard                           | M0116        | Keyboard    |
| 0x02          | Apple | Extended Keyboard                  | M0115        | Keyboard    |
| 0x02          | Apple | Extended Keyboard II               | M3501        | Keyboard    |
| 0x02          | Apple | AppleDesign Keyboard               | M2980        | Keyboard    |
| 0x04[^5]      | Apple | Keyboard ISO                       | M0118[^6]    | Keyboard    |
| 0x05[^5]      | Apple | Extended Keyboard ISO              | M0115[^6]    | Keyboard    |
| 0x06[^5]      | Apple | Portable Keyboard                  | ?            | Keyboard    |
| 0x07[^5]      | Apple | Portable Keyboard ISO              | ?            | Keyboard    |
| 0x08          | Apple | Keyboard II                        | M0487        | Keyboard    |
| 0x09[^5]      | Apple | Keyboard II ISO                    | ?            | Keyboard    |
| 0x0A/0x0C[^5] | Apple | Powerbook 100/140/170 Keyboard     | ?            | Keyboard    |
| 0x0D[^5]      | Apple | Powerbook 100/140/170 Keyboard ISO | ?            | Keyboard    |
| 0x0E[^5]      | Apple | Adjustable Keyboard Keypad         | M1242[^6]    | Keypad      |
| 0x10[^5]      | Apple | Adjustable Keyboard                | M1242[^6]    | Keyboard    |
| 0x11[^5]      | Apple | Adjustable Keyboard ISO            | ?            | Keyboard    |
| 0x12[^6]      | Apple | Adjustable Keyboard JIS            | ?            | Keyboard    |
| 0x16[^6]      | Apple | Keyboard II JIS                    | M0487[^6]    | Keyboard    |

## Relative Pointing Devices

Original Address 0x3

| Handler ID   | Make            | Model Name      | Model Number | Description                 |
| ------------ | --------------- | --------------- | ------------ | --------------------------- |
| 0x01         | Apple           | Mouse           | A9M0031      | Mouse                       |
| 0x23         | Advanced Gravis | MouseStick GMPU |              | 3-button joystick interface |
| 0x23[^4]     | Advanced Gravis | MouseStick II   |              | 5-button joystick           |
| 0x32[^3][^7] | Kensington      | Turbo Mouse     | 64210        | Trackball 4-button device   |

## Absolute Pointing Devices

Original Address 0x4

| Handler ID | Make  | Model Name              | Model Number | Description     |
| ---------- | ----- | ----------------------- | ------------ | --------------- |
| 0x3A[^3]   | Wacom | ArtZ 6x8 / Digitizer II | UD-0608-A    | Graphics tablet |

## Low-Speed Serial Devices

Original Address 0x5

| Handler ID | Make           | Model Name   | Model Number | Description     |
| ---------- | -------------- | ------------ | ------------ | --------------- |
| 0x36[^1]   | Global Village | TelePort ADB | A300         | 2400-baud modem |

## Other Devices

Original Address 0x7

| Handler ID | Make                   | Model Name            | Model Number | Description                                 |
| ---------- | ---------------------- | --------------------- | ------------ | ------------------------------------------- |
| 0x02[^8]   | Apple                  | Adjustable Keyboard   | M1242        | Media keys device of AAK                    |
| 0x22       | Sophisticated Circuits | PowerKey              | PK-1         | Relay-controlled power strip                |
| 0x35[^7]   | Neotech                | Colour Adapter Module |              | Module for Neotech Image Grabber NuBus card |
| 0x41       | JLCooper Electronics   | Media Control Station | 300007       | Jog dial and media control device           |
| 0x79[^2]   | LaCie                  | FM Radio              | ?            | FM radio                                    |
| 0x7A[^10]  | BeeHive Technologies   | ADB I/O               |              | Analog and digital I/O interface            |
| 0x87       | Sophisticated Circuits | PowerKey Rebound!     | PKRB-M       | Watchdog timer                              |

[^1]: Also known to use default address 0x7.
[^2]: [Source](https://vintagegeek.wordpress.com/2021/01/03/lacie-fm-radio-tuner-for-system-7-0-to-os9-macintosh-w-adb-port/#comment-1107)
[^3]: Also emulates a standard mouse on address 0x3.
[^4]: Initially has handler ID 0x01.
[^5]: [Source](https://github.com/elliotnunn/boot3/blob/f5582f37d04819abec51525ade1e021858a914e1/OS/Keyboard/Kbd.r)
[^6]: [Source](https://github.com/tmk/tmk_keyboard/wiki/Apple-Desktop-Bus#keyboard-handler-id)
[^7]: Source Jockelill on 68kMLA
[^8]: Source Velociraptors on 68kMLA
[^10]: [Source](https://web.archive.org/web/19980501032801/http://www.bzzzzzz.com:80/BeeHive/ADB_IO/Downloads/ADB_IO_manual.pdf)
Home Documents ADB 341 0232 A.Txt
341 0232 A.Txt

341 0232 A.Txt

ADB · TXT
Filename341-0232-A.txt
Size0.04 MB
Subsection apple / M0330_IIgs
Downloads8
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Contents
;
                                ;       Date:           Sat May 02 09:40:17 2020
                                ;
                                ;       CPU:            Intel 8048 (MCS-48 family)
                                ;
                                ;
                                ;
                                        org     00000H
                                ;
0000                            L0000:
0000 : E5               " "             sel     mb0
0001 : 04 0B            "  "            jmp     L000B
                                ;
0003 : E5               " "             sel     mb0
0004 : 00               " "             nop
0005 : 04 00            "  "            jmp     L0000
                                ;
0007 : E5               " "             sel     mb0
0008 : 04 00            "  "            jmp     L0000
000A                            L000A:
000A : 93               " "             retr
                                ;
000B                            L000B:
000B : 23 7F            "# "            mov     a,#07FH
000D : 3A               ":"             outl    p2,a
000E : 15               " "             dis     i
000F : 35               "5"             dis     tcnti
0010 : 65               "e"             stop    tcnt
0011 : A5               " "             clr     f1
0012 : 14 0A            "  "            call    L000A
0014 : 89 FF            "  "            orl     p1,#0FFH
0016 : 27               "'"             clr     a
0017 : D7               " "             mov     psw,a
0018 : 62               "b"             mov     t,a
0019 : B8 3F            " ?"            mov     r0,#03FH
001B                            L001B:
001B : A0               " "             mov     @r0,a
001C : E8 1B            "  "            djnz    r0,L001B
001E : D5               " "             sel     rb1
001F : BE 22            " ""            mov     r6,#022H
0021 : BD 01            "  "            mov     r5,#001H
0023                            L0023:
0023 : C5               " "             sel     rb0
0024 : 23 FF            "# "            mov     a,#0FFH
0026                            L0026:
0026 : B8 3F            " ?"            mov     r0,#03FH
0028 : B9 17            "  "            mov     r1,#017H
002A                            L002A:
002A : A0               " "             mov     @r0,a
002B : C8               " "             dec     r0
002C : E9 2A            " *"            djnz    r1,L002A
002E : 18               " "             inc     r0
002F : 90               " "             movx    @r0,a
0030 : AC               " "             mov     r4,a
0031 : BA 01            "  "            mov     r2,#001H
0033 : BF 00            "  "            mov     r7,#000H
0035 : A5               " "             clr     f1
0036 : B5               " "             cpl     f1
0037 : D5               " "             sel     rb1
0038 : BA 00            "  "            mov     r2,#000H
003A : FF               " "             mov     a,r7
003B : 53 FD            "S "            anl     a,#0FDH
003D : AF               " "             mov     r7,a
003E                            L003E:
003E : 25               "%"             en      tcnti
003F : 45               "E"             strt    cnt
0040 : C5               " "             sel     rb0
0041 : 1D               " "             inc     r5
0042 : 56 4B            "VK"            jt1     L004B
0044 : 76 4C            "vL"            jf1     L004C
0046 : 42               "B"             mov     a,t
0047 : 96 4D            " M"            jnz     L004D
0049 : 04 E3            "  "            jmp     L00E3
                                ;
004B                            L004B:
004B : A5               " "             clr     f1
004C                            L004C:
004C : B5               " "             cpl     f1
004D                            L004D:
004D : 27               "'"             clr     a
004E : 62               "b"             mov     t,a
004F : FC               " "             mov     a,r4
0050 : 37               "7"             cpl     a
0051 : C6 55            " U"            jz      L0055
0053 : 44 19            "D "            jmp     L0219
                                ;
0055                            L0055:
0055 : EA 63            " c"            djnz    r2,L0063
0057 : BA 58            " X"            mov     r2,#058H
0059 : B9 3F            " ?"            mov     r1,#03FH
005B : BB 01            "  "            mov     r3,#001H
005D : 04 6A            " j"            jmp     L006A
                                ;
005F                            L005F:
005F : C9               " "             dec     r1
0060 : C9               " "             dec     r1
0061 : 04 6A            " j"            jmp     L006A
                                ;
0063                            L0063:
0063 : FB               " "             mov     a,r3
0064 : C6 00            "  "            jz      L0000
0066 : E7               " "             rl      a
0067 : AB               " "             mov     r3,a
0068 : 12 5F            " _"            jb0     L005F
006A                            L006A:
006A : 23 FF            "# "            mov     a,#0FFH
006C : 90               " "             movx    @r0,a
006D : F9               " "             mov     a,r1
006E : 77               "w"             rr      a
006F : 53 0F            "S "            anl     a,#00FH
0071 : 03 74            " t"            add     a,#074H
0073 : B3               " "             jmpp    @a                                              ;INFO: indirect jump
                                ;
0074 : 00               " "             nop
0075 : 00               " "             nop
0076 : 00               " "             nop
0077 : 00               " "             nop
0078 : 00               " "             nop
0079 : AB               " "             mov     r3,a
007A : A7               " "             cpl     c
007B : A3               " "             movp    a,@a
007C : 9F               " "             anld    p7,a
                                ;
007D : 9B               " "             db      09BH
                                ;
007E : 97               " "             clr     c
007F : 93               " "             retr
                                ;
0080 : 8F               " "             orld    p7,a
                                ;
0081 : 8B 87            "  "            db      08BH, 087H
                                ;
0083 : AF               " "             mov     r7,a
0084 : 00               " "             nop
0085 : 04 00            "  "            jmp     L0000
                                ;
0087 : 99 FE            "  "            anl     p1,#0FEH
0089 : 04 BC            "  "            jmp     L00BC
                                ;
008B : 99 FD            "  "            anl     p1,#0FDH
008D : 04 BC            "  "            jmp     L00BC
                                ;
008F : 99 FB            "  "            anl     p1,#0FBH
0091 : 04 BC            "  "            jmp     L00BC
                                ;
0093 : 99 F7            "  "            anl     p1,#0F7H
0095 : 04 BC            "  "            jmp     L00BC
                                ;
0097 : 99 EF            "  "            anl     p1,#0EFH
0099 : 04 BC            "  "            jmp     L00BC
                                ;
009B : 99 DF            "  "            anl     p1,#0DFH
009D : 04 BC            "  "            jmp     L00BC
                                ;
009F : 99 BF            "  "            anl     p1,#0BFH
00A1 : 04 BC            "  "            jmp     L00BC
                                ;
00A3 : 99 7F            "  "            anl     p1,#07FH
00A5 : 04 BC            "  "            jmp     L00BC
                                ;
00A7 : 9A FE            "  "            anl     p2,#0FEH
00A9 : 04 BC            "  "            jmp     L00BC
                                ;
00AB : 9A FD            "  "            anl     p2,#0FDH
00AD : 04 BC            "  "            jmp     L00BC
                                ;
00AF : FB               " "             mov     a,r3
00B0 : F2 B5            "  "            jb7     L00B5
00B2 : 0A               " "             in      a,p2
00B3 : 04 C1            "  "            jmp     L00C1
                                ;
00B5                            L00B5:
00B5 : 27               "'"             clr     a
00B6 : 86 C1            "  "            jni     L00C1
00B8 : 23 FF            "# "            mov     a,#0FFH
00BA : 04 C1            "  "            jmp     L00C1
                                ;
00BC                            L00BC:
00BC : 08               " "             ins     a,bus
00BD : 8A 7F            "  "            orl     p2,#07FH
00BF : 89 FF            "  "            orl     p1,#0FFH
00C1                            L00C1:
00C1 : AC               " "             mov     r4,a
00C2 : C9               " "             dec     r1
00C3 : D1               " "             xrl     a,@r1
00C4 : 5B               "["             anl     a,r3
00C5 : C6 CF            "  "            jz      L00CF
00C7 : FB               " "             mov     a,r3
00C8 : D1               " "             xrl     a,@r1
00C9 : A1               " "             mov     @r1,a
00CA : 19               " "             inc     r1
00CB                            L00CB:
00CB : BC FF            "  "            mov     r4,#0FFH
00CD                            L00CD:
00CD : 04 3E            " >"            jmp     L003E
                                ;
00CF                            L00CF:
00CF : 19               " "             inc     r1
00D0 : FC               " "             mov     a,r4
00D1 : D1               " "             xrl     a,@r1
00D2 : 5B               "["             anl     a,r3
00D3 : C6 CB            "  "            jz      L00CB
00D5 : FA               " "             mov     a,r2
00D6 : 03 99            "  "            add     a,#099H
00D8 : E3               " "             movp3   a,@a
00D9 : 2C               ","             xch     a,r4
00DA : 5B               "["             anl     a,r3
00DB : C6 CD            "  "            jz      L00CD
00DD : FC               " "             mov     a,r4
00DE : 43 80            "C "            orl     a,#080H
00E0 : AC               " "             mov     r4,a
00E1 : 04 3E            " >"            jmp     L003E
                                ;
00E3                            L00E3:
00E3 : D5               " "             sel     rb1
00E4 : B9 52            " R"            mov     r1,#052H
00E6                            L00E6:
00E6 : 56 F3            "V "            jt1     L00F3
00E8 : E9 E6            "  "            djnz    r1,L00E6
00EA : B9 88            "  "            mov     r1,#088H
00EC                            L00EC:
00EC : 56 F3            "V "            jt1     L00F3
00EE : E9 EC            "  "            djnz    r1,L00EC
00F0 : 00               " "             nop
00F1 : 04 00            "  "            jmp     L0000
                                ;
00F3                            L00F3:
00F3 : BC F0            "  "            mov     r4,#0F0H
00F5 : 85               " "             clr     f0
00F6 : FE               " "             mov     a,r6
00F7 : 47               "G"             swap    a
00F8 : AB               " "             mov     r3,a
00F9 : 5F               "_"             anl     a,r7
00FA : 37               "7"             cpl     a
00FB : 32 FE            "2 "            jb1     L00FE
00FD : 95               " "             cpl     f0
00FE                            L00FE:
00FE : B9 09            "  "            mov     r1,#009H
0100 : B8 01            "  "            mov     r0,#001H
0102 : 74 26            "t&"            call    L0326
0104 : DB               " "             xrl     a,r3
0105 : 5C               "\"             anl     a,r4
0106 : C6 16            "  "            jz      L0116
0108 : B6 0C            "  "            jf0     L010C
010A : 04 3E            " >"            jmp     L003E
                                ;
010C                            L010C:
010C : 8A 80            "  "            orl     p2,#080H
010E : B9 1C            "  "            mov     r1,#01CH
0110                            L0110:
0110 : E9 10            "  "            djnz    r1,L0110
0112 : 9A 7F            "  "            anl     p2,#07FH
0114 : 04 3E            " >"            jmp     L003E
                                ;
0116                            L0116:
0116 : B9 23            " #"            mov     r1,#023H
0118                            L0118:
0118 : 56 1E            "V "            jt1     L011E
011A : E9 18            "  "            djnz    r1,L0118
011C : 04 3E            " >"            jmp     L003E
                                ;
011E                            L011E:
011E : 27               "'"             clr     a
011F : 62               "b"             mov     t,a
0120 : FB               " "             mov     a,r3
0121 : 53 0F            "S "            anl     a,#00FH
0123 : 03 26            " &"            add     a,#026H
0125 : B3               " "             jmpp    @a                                              ;INFO: indirect jump
                                ;
0126 : F0               " "             mov     a,@r0
0127 : 58               "X"             anl     a,r0
0128 : 52 52            "RR"            jb2     L0152
012A : 52 52            "RR"            jb2     L0152
012C : 52 52            "RR"            jb2     L0152
012E : 52 52            "RR"            jb2     L0152
0130 : 52 39            "R9"            jb2     L0139
0132 : C8               " "             dec     r0
0133 : 52 8E            "R "            jb2     L018E
0135 : 74 00            "t "            call    L0300
0137 : 04 00            "  "            jmp     L0000
                                ;
0139                            L0139:
0139 : 27               "'"             clr     a
013A : AC               " "             mov     r4,a
013B : AB               " "             mov     r3,a
013C : B9 1A            "  "            mov     r1,#01AH
013E                            L013E:
013E : 46 44            "FD"            jnt1    L0144
0140 : E9 3E            " >"            djnz    r1,L013E
0142 : 04 3E            " >"            jmp     L003E
                                ;
0144                            L0144:
0144 : B9 09            "  "            mov     r1,#009H
0146 : B8 02            "  "            mov     r0,#002H
0148 : 74 03            "t "            call    L0303
014A : AC               " "             mov     r4,a
014B : FB               " "             mov     a,r3
014C : 96 54            " T"            jnz     L0154
014E : FC               " "             mov     a,r4
014F : 53 2F            "S/"            anl     a,#02FH
0151 : AE               " "             mov     r6,a
0152                            L0152:
0152 : 04 3E            " >"            jmp     L003E
                                ;
0154                            L0154:
0154 : D3 FF            "  "            xrl     a,#0FFH
0156 : 96 5A            " Z"            jnz     L015A
0158 : 04 23            " #"            jmp     L0023
                                ;
015A                            L015A:
015A : D3 02            "  "            xrl     a,#002H
015C : 96 6B            " k"            jnz     L016B
015E : 0A               " "             in      a,p2
015F : 72 52            "rR"            jb3     L0152
0161                            L0161:
0161 : FC               " "             mov     a,r4
0162 : 53 0F            "S "            anl     a,#00FH
0164 : 2E               "."             xch     a,r6
0165 : 53 20            "S "            anl     a,#020H
0167 : 4E               "N"             orl     a,r6
0168 : AE               " "             mov     r6,a
0169 : 04 3E            " >"            jmp     L003E
                                ;
016B                            L016B:
016B : D3 03            "  "            xrl     a,#003H
016D : 96 52            " R"            jnz     L0152
016F : FF               " "             mov     a,r7
0170 : 52 52            "RR"            jb2     L0152
0172 : 24 61            "$a"            jmp     L0161
                                ;
0174 : FE               " "             mov     a,r6
0175 : 53 F0            "S "            anl     a,#0F0H
0177 : AC               " "             mov     r4,a
0178 : C5               " "             sel     rb0
0179 : FD               " "             mov     a,r5
017A : D5               " "             sel     rb1
017B : 53 0F            "S "            anl     a,#00FH
017D : 4C               "L"             orl     a,r4
017E : AC               " "             mov     r4,a
017F : 0A               " "             in      a,p2
0180 : 53 10            "S "            anl     a,#010H
0182 : E7               " "             rl      a
0183 : E7               " "             rl      a
0184 : 4C               "L"             orl     a,r4
0185 : AC               " "             mov     r4,a
0186 : FD               " "             mov     a,r5
0187 : AB               " "             mov     r3,a
0188 : B9 08            "  "            mov     r1,#008H
018A : 54 50            "TP"            call    L0250
018C : 04 3E            " >"            jmp     L003E
                                ;
018E                            L018E:
018E : 0A               " "             in      a,p2
018F : 77               "w"             rr      a
0190 : 77               "w"             rr      a
0191 : AC               " "             mov     r4,a
0192 : 53 0F            "S "            anl     a,#00FH
0194 : 03 B5            "  "            add     a,#0B5H
0196 : A3               " "             movp    a,@a
0197 : 86 9B            "  "            jni     L019B
0199 : 43 20            "C "            orl     a,#020H
019B                            L019B:
019B : 2C               ","             xch     a,r4
019C : 92 A2            "  "            jb4     L01A2
019E : 23 FB            "# "            mov     a,#0FBH
01A0 : 5C               "\"             anl     a,r4
01A1 : AC               " "             mov     r4,a
01A2                            L01A2:
01A2 : 99 7F            "  "            anl     p1,#07FH
01A4 : 08               " "             ins     a,bus
01A5 : 89 FF            "  "            orl     p1,#0FFH
01A7 : 72 AD            "r "            jb3     L01AD
01A9 : 23 BF            "# "            mov     a,#0BFH
01AB : 5C               "\"             anl     a,r4
01AC : AC               " "             mov     r4,a
01AD                            L01AD:
01AD : BB 00            "  "            mov     r3,#000H
01AF : B9 02            "  "            mov     r1,#002H
01B1 : 54 50            "TP"            call    L0250
01B3                            L01B3:
01B3 : 04 3E            " >"            jmp     L003E
01B5 : C4 C6            "  "            jmp     L06C6
                                ;
01B7 : C5               " "             sel     rb0
01B8 : C7               " "             mov     a,psw
01B9 : D4 D6            "  "            call    L06D6
01BB : D5               " "             sel     rb1
01BC : D7               " "             mov     psw,a
01BD : CC               " "             dec     r4
01BE : CE               " "             dec     r6
01BF : CD               " "             dec     r5
01C0 : CF               " "             dec     r7
01C1 : DC               " "             xrl     a,r4
01C2 : DE               " "             xrl     a,r6
01C3 : DD               " "             xrl     a,r5
01C4 : DF               " "             xrl     a,r7
01C5 : 00               " "             nop
01C6 : 04 00            "  "            jmp     L0000
                                ;
01C8 : FF               " "             mov     a,r7
01C9…

Showing first 20,000 characters of 46,608 total. Open the full document →

Subscribe to Text
mp.ls