Help using M3 ram

edited September 2008 in Development
From the Multiface 3 manual.
6.0 The Use of Extra 8K RAM

The MULTIFACE's 8K RAM extension can be accessed and used for other purposes.
This, however, requires a good knowledge of machine code plus further
information on how to access the RAM extension.

Doesn't give any details whatsover, I guess its not a simple IN A, (191)?

I've been using the Multiface 128 ram for my own programs, now need to use +3 hardware to access the disk.

Thanks
Post edited by FrankT on

Comments

  • edited September 2008
    IN A,(63) pages in.
    IN A,(191) pages out.
  • edited September 2008
    Same as multiface 128 then. Thanks. Here is my code that pokes a defb block of code into the multiface. Easier than lots of inc hl, ld (hl), 32 poking.
    org 32768
    	di
    	in a, (63)	; page multiface +3 ram 'in'
    	ld hl, 9000	; address of custom routine
    	ld (8192), hl	; jump address in 8192
    	ld hl, 8195
    	ld (hl), 82	; 'R'
    	inc hl
    	ld (hl), 85	; 'U'
    	inc hl
    	ld (hl), 78	; 'N'
    
    	ld de, 9000
    	ld hl, m3app
    	
    get	ld a, (hl)
    	cp 101		; 'e'
    	jr z, cmpn
    	
    poke	ld (de), a
    	inc hl
    	inc de
    	jr get
    	
    cmpn	inc hl
    	ld a, (hl)
    	cp 110		; 'n'
    	jr z, cmpd
    	
    dechl	dec hl
    	ld a, (hl)
    	jr poke
    	
    cmpd	inc hl
    	ld a, (hl)
    	cp 100		; 'd'
    	jr z, pageout
    	dec hl
    	jr dechl
    	
    pageout	in a, (191)	; page multiface +3 ram 'out'
    	ei
    	rst 0
    	
    
    ;	org 9000
    m3app	defb 0,0,0,0,0,0,0,0	; block of code here
    	defm "end"		; end marker (defb 101, 110, 100)
    
  • edited September 2008
    FrankT wrote: »
    Same as multiface 128 then.

    Nope, other way round ;)
  • edited September 2008
    Woody wrote: »
    Nope, other way round ;)

    Oops, yes, i've corrected above listing now. Thanks again, now to try and write a program to write to disk starting at cylinder 0/sector 0.

    I'm attempting to write a program to byte copy a disk in its entirety. So I can get disks built with your excellent diskbuilder program onto my proper +3 disk/hardware via tape files with original hardware.

    Probably already been done a hundred times but I want to do it for myself anyway. (probably because I wanted to do it when I was a nipper)

    Cheers.
    :)

    p.s.
    Anyone know of areas in M3 ram that are possibly used and I should avoid? Or is it all free to use?
  • edited September 2008
    Looks to be safe in the #260B-#3F00 range. If you have problems with that then nudge the lower end up a bit cos I may've missed something but I'm fairly certain the upper range address is safe.
Sign In or Register to comment.