Skip to content

Instantly share code, notes, and snippets.

@codingbychanche
Created October 16, 2022 08:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codingbychanche/92c131f8415839ee9feff587f21d7f19 to your computer and use it in GitHub Desktop.
Shows how Atari Basic can be copied from ROM to RAM... Credits: https://goto10.substack.com/p/change-the-atari-basic-ready-prompt. This is my version of the code from the link mentioned.
; Copys Basic from ROM into RAM.
;
; Allows one to change Atari Basic, e.g. change ready prompt etc.
;
; Initial idea: https://goto10.substack.com/p/change-the-atari-basic-ready-prompt
;
; B.Fritz 10/2022
; ---------------------------------------------------------------------------------
; Some addresses to play with:
; Ready promt starts at: 48499
;
org $0600
lda #0
sta 204
lda #160 ; Basic starts here => 40960
sta 205
ldy #0
ldx #32 ; 32 pages => 8192 bytes.
loop
lda (204),y ; This does the trick: Copy one byte from ROM to the same addrress in RAM
pha ; Get byte from ROM
lda #255 ; Basic off
sta $d301
pla ; Write back to RAM
sta (204),y
lda #253 ; Basic on
sta $d301
iny
bne loop
inc 205
dex
bne loop ; Repeat until all 32 pages are done.
;
; Example on how to change Atari Basic in RAM
;
lda #255 ; Basic off
sta $d301
ldy #0 ; Change prompt.
ldx #5
l2
lda prompt,y
sta 48498,x
iny
dex
bne l2
;
; Activates Basic rom and returns....
; To activate in- ram- basic type Poke 54017,255.
; To return to in- rom- version type Poke 54017,253
;
rts
;
; Some Data
;
prompt
.byte 'Ok '
@codingbychanche
Copy link
Author

Screen Shot 2022-10-16 at 10 23 52 AM

@codingbychanche
Copy link
Author

Switching between Atari Basic in ROM and its customized version in RAM....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment