Miob.asm

From TheRetroWagon
Revision as of 04:36, 10 August 2018 by Jeffa (talk | contribs) (Initial creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 
;MIO BOARD CRI INITIALIZATION PROGRAMS 
;ADDRESS DEFINITIONS FOR MIO BOARD CONFIGURE') 
;AS DEFINED IN MIO USER GUIDE - SECTION 1.2
SIC     EQU 42S
PIO     EOU 419
CNT     ECU 43H
CRI     EQU 409
SSPT    EQU OFFS      . ;SENSE LIGHTS AND SWITCHES
RASA    SOU 31009
BASH    EQU 3000H
BUFR    EQU 3600H
STACK   EQU 36009
;SYNC RECOGNITION PROGRAM - FINDS INITIAL SYNC 
;AND THEN SETS ALL SENSE LIGHTS FOR EACH SYNC
;BYTE THEREAFTER. IF A SYNC BYTE IS MISSED SETS SENSE 
;SENSE SWITCHES TO ZERO AND LOOKS FOR SYNC AGAIN.
        CRC BASS
SYNR:   MVI A,609
        OUT CNT         ;ENABLE READ AND READY BY SIT
        XRA A
        CNA             ;FOR PROPER LIGHTS 
        OUT SSPT        ;CLEAR LIGHTS
SYNR1: IAN CNT          ;WAIT FOR READY
        ANI 4
        JZ SYNR1 
        IN CRI          ;SEE IF SYNC BYTE
        SUI 0E6H
        JNZ SYNR        ;IF NOT, RELCOP
        OUT SSPT        ;YES SET LIGHTS TO ONES 
        MVI A,200       ;SET TO READ BYTES
        OUT CNT
        JMP SYNR1       ;GO LOOK AT NEXT BYTE
;SYNC GENERATION PROGRAM- WRITES SYNC BYTE CONTINUOUSLY
SYNC:   MVI A,10H       ;SET WRITE ENABLE
        OUT CNT
SYNG2: MVI A,0E6H       ;OUTPUT SYNC CHAR 
        OUT CRI
SYNG1: IN CNT           ;WAIT TIL READY AGAIN
        AN/ 4
        JZ SYNG1 
        JMP SYNG2       ;THEN DC ANOTHER
;BOOTSTRAP PROGRAM FOR TARBELL CODE
BOOT:   LXI H,BASA      ;GET STARTING ADDRESS
        MVI A,60H       ;SET READ AND READY BY BIT
        OUT CNT
BOOT': IN CNT           ;LOOK FOR SYNC CHAR
        ANT 4
        J2 pool,'
        IN CBI          ;GET CHAR
        CPI OE‘i
        JNZ 900T1
        MVI A,20H       ;GO TO BYTE
        OCT CNT
BOOT2: IN CNT           ;WAIT FOR BYTE
        ANI 4
        JZ BOOT2