1
0
mirror of https://github.com/option8/OUP-M.git synced 2024-07-12 04:28:57 +00:00
OUP-M/COLDLD.s

79 lines
1.5 KiB
ArmAsm
Raw Normal View History

2018-09-12 16:09:00 +00:00
10 ;OUP/M COLDLD WRITTEN BY SHAO,JIAN-XIONG
20 ;ON JULY 1982.
30 *=$2200
40 JMP CDBTLD
50 BIOSA1 .WORD $2280
60 BIOSA2 .WORD $DE00
70 BIOSPG .BYTE $0C
80 MVREG1=$53
90 MVREG2=$55
100 IOBFFG=$39
110 TKNDER=$44
120 TRKCRN=$48
130 DVACIA=$C010
140 FRYCST=$E41B
150 WBOOT=$E477
160 BOOT=$E42F
170 SFTSWT=$F701
180 FRYCCT .BYTE $31,$31,$31,$31,$31
190 .BYTE $62,$62,$62,$62
200 .BYTE $A0,$A0,$A0,$A0
210 .BYTE $A0,$A0,$A0,$A0
220 ;
230 CDBTLD=* ;COLD BOOT LOADER
240 ;
250 CLD ;MOVE BIOS AND PART OF
260 LDA BIOSA1 ;BDOS TO ITS REGULAR POSITION
270 STA MVREG1
280 LDA BIOSA1+1
290 STA MVREG1+1
300 LDA BIOSA2
310 STA MVREG2
320 LDA BIOSA2+1
330 STA MVREG2+1
340 LDX BIOSPG
350 LDY #$00
360 C$BTLD=*
370 LDA (MVREGl),Y
380 STA (MVREG2),Y
390 INY
400 BNE C$BTLD
410 INC MVREG1+1
420 INC MVREG2+1
430 DEX
440 BNE C$BTLD
450 LDA #$34 ;ADJUST FREQUENCY
460 STA SFTSWT
470 LDY #$00
480 LDA #$03
490 STA DVACIA
500 LDA #$38
510 STA DVACIA
520 STA DVACIA+1
530 PHA
540 PLA
550 PHA
560 PLA
570 PHA
580 PLA
590 STX DVACIA+1
600 AD$TFY=*
610 LDA DVACIA
620 BMI A$JTFY
630 INY
640 BNE AD$TFY
650 A$JTFY=*
660 LDA FRYCCT,Y
670 STA FRYCST
680 JSR BOOT ;INITIALIZE ALL INTERFACE
690 LDA #$00
700 STA IOBFFG
710 STA TKNDER ;MARK HEAD POSITION TO 0
720 STA TRKCRN
730 LDA #$FF ;SET COLD BOOT FLAG
740 TAX
750 TXS
760 PHA
770 JMP WBOOT ;WBOOT CCP AND REST OF BDOS