Skip to main content
Home Documents Lisa CMD.Text
CMD.Text

CMD.Text

FilenameCMD.Text
Size0.01 MB
Subsection firmware / ROM88
Downloads2
Contents
.Page ;++ ; ; Cmd ; ; Cmd is the commmand interpreter; it looks at the Iob Gobyte and evaluates the ; command to be done. If an interrupt is pending, '81' command will be ; aborted. All commands are checked for the validity of their parameters by ; the "Validate" routine. ; ; REGISTERS ; All = Destroyed ; ; CALLS ; Validate Validates the parameters of the Iob ; Rwts Handles all commands related to the disk ; Seek Moves the heads to Drive/Side/Track ; Call Will call routine ; ClrIst Clears the Interrupt Status Bye ; SetIMsk Enables drives for interrupts using mask byte ; ClrIMsk Disables drives for interrupts using mask byte ; WaitROM Waits for particular GoByte sequence before Cold Restart ; ESAD Will only access ROM; loops forever on until reset ;++ .Page ;++ ; For x:=IobSize Downto 0 do Transfer Iob into internal copy ; iiob,x := iob,x; ; "A" reg will be left containing GoByte ;-- Cmd .Equ * ; Entry point for Cmd Ldy CmdX Ldx #IobSize ; Move only the eight bytes that are passed Cmd1 Lda Iob,x ; Fetch Sta IIob,x ; And deposit Sta @SaveL,y ; for posterity Dey Dex ; Count down Bpl Cmd1 Sty Cmdx Iny Bne $32 Ldy #CmdLeng Sty CmdX ; If IIob.Gobyte = 81 then ; Goto Rwts $32 Cmp #RwtsCmd ; Rwts command? Beq Rwts ; Yes & let Rts from Rwts return to Loop ; Else ; Begin ; In not (IIob.GoByte in [Valid IIob.GoByte]) then ; begin ; Iob.GoByte := 001; Invalid command ; Carry := Clear Command completed ; Return ; end; ; Validate Cmp #NullCmd ; If null command then exit Beq CmdNoErr Sec Sbc #LwCmdNo ; Subtract lowest command number Bcc Cmd3 ; Oooops! Not a valid GoByte command Cmp #CmdNumb+1 ; Number of commands in range Bcc Cmd5 ; Skip if valid GoByte command Cmd3 Lda #GErrCmd ; Else signal invalid GoByte Bne CmdClnUp ; Cleanup & exit Cmd5 Tax ; Index to command already in A-reg! Sta HoldInx ; Save index fro the moment Lda TestGoB,x ; Fetch Parsing for GoByte Commands Jsr Validate ; And validate it Bcs CmdClnUp ; Not a valid command Lda HoldInx ; Get back the index to the command ; If Valid then ; case GoByte of ; 83: Seek Seek to track ; 84: Call Call 6504 address ; 85: ClrIst Clear Ist (Interrupt Status) bits ; 86: SetIMsk Set (enable) bits in IMsk (Interrupt Mask) ; 87: ClrIMsk Clear (disable) bits in Imsk (Interrupt Mask) ; 88: WaitRom Wait in Rom (used by 68K ram test) ; 89: ESAD Jump to self in Rom and never return ; End; {case} ; End; Asl A ; To index into word table Tax ; Use command number as index Jsr Cmd6 Lda HoldInx ; Fetch the index (0..6) Beq CmdRts ; Skip if comand was a "Seek" command Cmp #01 ; Also skip if it was a "Call" command Beq CmdRts CmdNoErr .Equ * Lda #0 ; Signal no error CmdClnUp Sta Iob+ErrStat ; Common error reporting code for Cmd and Rwts Lda #00 Sta Iob+GoByte ; Allow host to process error (if any) CmdRts Rts ; And exit ;-- ; ; Cmd Jump Table Dispatcher ; C…

Showing first 3,000 characters of 13,389 total. Open the full document →

MacTrove — a free archive of classic Macintosh software. Files mirrored from ftp.funet.fi/pub/mac (info-mac + funet legacy). All software provided for historical preservation.