Josh,

Here is the code for RAM test / detect:

; ======================================================
; Calculate physical RAM available
; ======================================================
7EE1H  (21H) LXI H,C000H    ; Ram modules start at High memory (8K chunks)
7EE4H  (7EH) MOV A,M        ; Load current value at this address
7EE5H  (2FH) CMA            ; Compliment the value
7EE6H  (77H) MOV M,A        ; And write it back (non-destructive test)
7EE7H  (BEH) CMP M          ; Compare if the value "took" (i.e. there's RAM
there)
7EE8H  (2FH) CMA            ; Compliment data back to original value
7EE9H  (77H) MOV M,A        ; Save original value (in case there IS RAM
there)
7EEAH  (7CH) MOV A,H        ; Load MSB of current RAM bank to A
7EEBH  (C2H) JNZ 7EF8H      ; Jump if no RAM present in this bank
7EEEH  (2CH) INR L          ; Increment LSB of RAM (test 256 bytes per 8K)
7EEFH  (C2H) JNZ 7EE4H      ; Jump to test next byte of this RAM
7EF2H  (D6H) SUI 20H        ; Decrement to next lower 8K memory range
7EF4H  (67H) MOV H,A        ; Save the new MSB of this 8K range
7EF5H  (FAH) JM 7EE4H       ; Jump back to test if RAM in this memory range

; ======================================================
; Lowest RAM location found
; ======================================================
7EF8H  (2EH) MVI L,00H      ; Clear LSB of lowest RAM address
7EFAH  (C6H) ADI 20H        ; Add 8K back to address (we over shot)
7EFCH  (67H) MOV H,A        ; Save MSB of lowest RAM address with RAM in it
7EFDH  (22H) SHLD FAC0H     ; Save as Lowest RAM address used by system
7F00H  (C9H) RET


On Tue, Apr 25, 2017 at 6:26 PM, Josh Malone <[email protected]> wrote:

> Hi all,
>
> I'm back to attempting once again to restore my 102 to a full 32k RAM. For
> those that don't remember, my 102 spontaneously cold-started on me one day
> in the middle of some BASIC coding and came up showing only 24k installed.
> A bit more BASIC proved that it was the "option" RAM that was not working
> correctly.
>
> Since last time, I've replaced the option RAM (M6) but the system still
> shows 24k.
>
> I'm assuming that the system does some sort of probe on a cold-start to
> determine how much RAM is installed. Does anybody know any details of how
> that probe works? I'd like to try and watch the activity on my logic
> analyzer and hopefully get a clue as to what's going on with my 102.
>
> Any help would be greatly appreciated.
>
> Thanks!
>
> -Josh
>

Reply via email to