Copy OS ROM to RAM#

by Russ Gilbert, found in comp.sys.atari.8bit

'MOVEOS.M65'
10       .TITLE      MOVE OS TO RAM
20       .OPT OBJ
30       *=  $8000
40 START LDA #0
50       STA $022F   TURN OFF ANTIC
60       STA $D40E
70       STA $D20E   DISABLE INTRPTS
80       SEI         MAKE SURE NO
90       LDA #$C0    INTERRUPTS
0100     STA $C1     SET UP BANK AREA
0110     LDY #0
0120     STY $C0
0130 L3  LDA ($C0),Y GET ROM BYTE
0140     TAX 
0150     LDA #$FE
0160     AND $D301   CLR BIT 0 TO
0170     STA $D301   BANK TO OS RAM
0180     TXA 
0190     STA ($C0),Y STORE BYTE
0200     LDA #$01
0210     ORA $D301
0220     STA $D301   BACK TO ROM
0230     INY         GET READY NEXT
0240     CPY #0
0250     BNE L3      256 TIMES
0260 NOK INC $C1
0270     CLC         DON'T UNDRSTND
0280     LDA $C1     THIS CNTRL LOOP
0290     CMP #$D0
0300     BCC T1      FROM $C0-$FF
0310     CMP #$D8    SKIP $D0-$D7
0320     BCC NOK
0330 T1  CMP #$00
0340     BNE L3
0350     CLC 
0360     LDA #$FF
0370     STA $D40E
0380     LDA #$F7
0390     STA $D20E   TURN ON NMI,IRQ
0400     LDA #$22
0410     STA $022F
0420     CLI 
0430     RTS 
0440     .END 
**************

Russ Gilbert

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
atr
MOVEOS_M65.ATR 133.1 kB 1 26-Oct-2015 16:46 Florian Dingler
« This page (revision-2) was last changed on 13-Mar-2010 15:03 by Carsten Strotmann