Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 3469

8-bit acorn hardware • Re: SWRAM detection for writing

$
0
0
There’s a short type in programme on this page for checking if a bank is ROM or RAM on the B+, if it’s of any help. https://www.firths.org/bbc/my_b+128k.html

Code:

 10FOR pass=0 TO 2 STEP 2   20P%=&900   30[OPTpass   40.writeram   50TAY:LDA &F4:PHA   60TXA   70STA &F4:STA &FE30   80TYA:LDY #0   90STA (&70),Y  100PLA  110STA &F4:STA &FE30  120RTS  130.readrom  140LDA &F4:PHA  150TXA  160STA &F4:STA &FE30  170LDY #0  180LDA (&70),Y  190TAY  200PLA:STA &F4:STA &FE30  210TYA  220RTS  230]  240?&70=&FF:?&71=&BF  250space$="  "  260FOR rom%=15 TO 0 STEP -1  270X%=rom%  280A%=USR readrom AND &FF  290A%=A%EOR&FF  300CALL writeram  310B%=USR readrom AND&FF  320IF B%<>A% GOTO400  330A%=A%EOR&FF  340CALL writeram  350B%=USR readrom AND&FF  360IF B%<>A% GOTO400  370PRINT "Location"+LEFT$(space$,3-LEN(STR$(rom%)))+STR$(rom%)+" is"+CHR$130+"RAM"  380NEXT  390END  400PRINT "Location"+LEFT$(space$,3-LEN(STR$(rom%)))+STR$(rom%)+" is"+CHR$129+"ROM"  410NEXT

Statistics: Posted by rmbrowngr — Wed Jan 29, 2025 7:55 pm



Viewing all articles
Browse latest Browse all 3469

Trending Articles