Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #4217

RamWorks test

Newsgroups comp.sys.apple2.programmer
Date 2018-02-14 20:26 -0800
Message-ID <10c538b8-b09d-41a3-a4cd-710e893c88bf@googlegroups.com> (permalink)
Subject RamWorks test
From Anthony Ortiz <anthonypaulo@gmail.com>

Show all headers | View raw


RamWorks publishes a bank test routine :

     Available Banks

The following subroutine will find all valid banks, determine the 
size of RamWorks memory, and save the results into BankTbl.  
BankTbl will have the number of 64K banks found, followed by the 
table of valid bank numbers.  Keep in mind that the bank numbers 
are not necessarily linear.  For example: 'BankTbl:08 00 01 02 03 
04 05 06 07'indicates a 512K RamWorks containing banks 0 through 7.

BankSel  EQU  $C073
MaxMem   EQU  3*16           ;Maximum desired, 3 megabytes in this example

*Write bank number to each bank
         STA  $C009          ;Store in alternate zero page
         LDY  #$7F           ;Valid banks range $00 to $7F
FindBanks
         STY  BankSel        ;Go through each bank
         STY  $00            ;Store the bank number
         TYA
         EOR  #$FF
         STA  $01            ;Second self-check
         DEY
         BPL  FindBanks
*Read them back to find valid banks and save in table
         LDA  #$00
         TAY
         TAX
FindThem
         STY  BankSel        ;Search through all banks
         STA  BankSel+3
         CPY  $00
         BNE  NotOne         ;Check bank number
         TYA
         EOR  #$FF
         CMP  $01            ;Check second double-check
         BNE  NotOne
         INX
         TYA                 ;Found valid bank-save in table
         STA  BankTbl,X
         CPX  #MaxMem        ;Found all banks to be used
         BCS  Done
NotOne
         INY                 ;Go through all valid bank ranges
         BPL  FindThem
*Ending routine
Done
         LDA  #$00           ;Reset to video bank
         STA  BankSel
         STA  $C008
         STX  BankTbl        ;Size of Ram card
         LDA  #$FF
         STA  BankTbl+1,X    ;Mark end of table
         JMP  Continue

BankTbl  DS   MaxMem+2
Continue EQU  *

Does anyone know if this is already conveniently compiled into a dsk image on asimov? If not, what would you recommend I use to compile it?

Back to comp.sys.apple2.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-14 20:26 -0800
  Re: RamWorks test gids.rs@sasktel.net - 2018-02-15 00:43 -0800
    Re: RamWorks test Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-02-15 07:38 -0600
      Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 05:48 -0800
        Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 21:25 -0800
          Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-15 21:57 -0800
            Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 01:23 -0800
              Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-16 05:51 -0800
                Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:09 -0800
                Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:10 -0800
                Re: RamWorks test gids.rs@sasktel.net - 2018-02-16 09:43 -0800
              Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-16 18:09 -0800
                Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-16 18:43 -0800
                Re: RamWorks test Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-16 18:59 -0800
                Re: RamWorks test gids.rs@sasktel.net - 2018-02-17 00:53 -0800
                Re: RamWorks test Michael J. Mahon <mjmahon@aol.com> - 2018-02-17 09:56 -0600
  Re: RamWorks test James Davis <JPD.Enterprises@outlook.com> - 2018-02-15 00:47 -0800
    Re: RamWorks test Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-15 03:00 -0800

csiph-web