DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦7c7f62f87⟧ TextFile

    Length: 3021 (0xbcd)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦81d6400c6⟧ 
            └─⟦this⟧ 

TextFile

;
;ACIA memory mapped
;PPI  non memory mapped
;PTM  memory mapped 
;        
        OPTIONS	CONVERT

ROM	EQU	1000H
RAM     EQU     5000H
STACK	EQU	4500H

AdrIt   EQU     22A0H
Rit1    EQU     2340H
Rit2    EQU     2380H 
Var     EQU     RAM

ACIA	EQU	6018H
Status	EQU	ACIA
Ctrl    EQU     ACIA
Port    EQU     ACIA+1
Reset   EQU     03H
ModNit  EQU     10H

PPI	EQU	18H
PortA   EQU     PPI
PortB   EQU     PPI+1
PortC   EQU     PPI+2
Ctrl1   EQU     PPI+3
Mode1   EQU     10111000B     ; A mode 1 in - B mode 0 out
Inta    EQU     09H           ; It flag A set

PTM	EQU	601CH
Ctrl3   EQU     PTM
Ctrl2   EQU     PTM+1
T1Msb   EQU     PTM+2
T1Lsb   EQU     PTM+3
T2Msb   EQU     PTM+4
T2Lsb   EQU     PTM+5
T3Msb   EQU     PTM+6
T3Lsb   EQU     PTM+7
Etat    EQU     PTM+1
Cr1     EQU     40H    ; continu + 16 + IT 
Cr2     EQU     55H    ; continu + 2*8 + IT
Cr3     EQU     61H    ; monocoup + 16 + IT + /8
Init    EQU     21H    ; Init compteur
val1    EQU     08H
val2    EQU     10H  
val3    EQU     16H
haut    EQU     08H

	ORG	ROM

;Init Z80  
        LD      SP,STACK
        ld      a,22H
        ld      i,a
        IM2

;Init ACIA
        LD      A,Reset
        LD      (Ctrl),A
        LD      A,ModNit
        LD      (Ctrl),A

;Init PPI
        LD      A,Mode1
        OUT     (Ctrl1),A
        LD      A,inta
        OUT     (Ctrl1),A

;Init PTM
        LD      A,Cr3
        LD      (Ctrl3),A
        LD      A,Cr2
        LD      (Ctrl2),A
        LD      A,Cr1
        INC     A
        LD      (Ctrl3),A
        LD      A,haut
        LD      (t1Msb),A
        LD      A,val1
        LD      (t1Lsb),A
        LD      A,haut
        LD      (t2Msb),A
        LD      A,val2
        LD      (t2Lsb),A
        LD      A,haut
        LD      (t3Msb),A
        LD      A,val3
        LD      (t3Lsb),A
        LD      A,Cr1
        LD      (Ctrl3),A
        EI

;Debut routine principale 
        LD      C,0
loop:   INC     C
        JP      loop

;Definition des adresses routines IT
        ORG     AdrIt    
        DEFB    00H
        DEFB    23H
        DEFB    40H
        DEFB    23H
        DEFB    80H 
        DEFB    23H
   

;Routine It pour PPI
        ORG     Rit1
        PUSH    AF
        PUSH    BC
        IN      A,(PortA)
        LD      (Var),A
emet:   LD      A,(Status)
        AND     2
        JR      Z,emet
        LD      A,(Var)
        LD      (Port),A
        POP     BC
        POP     AF
        EI
        RET

;Routine It pour PTM
        ORG     Rit2
        PUSH    AF
        PUSH    BC
        LD      A,(Etat)
        AND     1
        JP      cpt1 
        AND     2
        JP      cpt2
        AND     4
        JP      cpt3
        JP      fin

cpt1:   LD      A,(t1Msb)
        LD      A,(t1Lsb)
        JP      fin   
        
cpt2:   LD      A,(t2Msb)
        LD      A,(t2Lsb)
        JP      fin   

cpt3:   LD      A,(t3Msb)
        LD      A,(t3Lsb)
        JP      fin   

fin:    POP     BC
        POP     AF
        EI
        RET
        

	END