Sharp logo

Using the Sharp 64K-RAM Card MZ-1R18 
MZ800 Basic

There are 47kb RAM free of 64kb if using this card. For programming information like command syntax refer to the Basic Manual. The Sharp 64K-RAM card MZ-1R18 is similar to the K & P RAM card.

PCP/M

The Sharp P-CPM is fully supported. The drive number is "E" and you can use a maximum of 63kb.

Machine Language


The card uses two I/O addresses: $EB and $EA. $EB is used to address the 64k RAM. $EA is the data port. The address is automatically incremented by each access to the data port. This gives an efficient RAM access by using the Z80 commands.

Examples:

Write demo program:

LD   HL,$A000    ;FROM $A000
FLOOP1: ;FORMATTING
LD (HL),$FF ;A ARRAY
INC HL
LD A,H
CP $B0 ;TO $AFFF
JR NZ,FLOOP1
LD HL,$A000 ;SOURCE RAM
LD DE,$A000 ;DESTINATION RAM DISK
LD BC,$1000 ;SIZE
WLOOP1:
LD A,(HL) ;RAM-VECTOR
PUSH AF
PUSH BC
LD A,E ;LOW VECTOR LSB
LD B,D ;HIGH VECTOR MSB
LD C,$EB ;$EB = PORT
OUT (C),A ;ADDRESS OUT
POP BC
POP AF
OUT ($EA),A ;DATA OUT
INC HL
INC DE
DEC BC
LD A,B ;BC = 0 ?
OR C
JR NZ,WLOOP1
RET

Read demo program:

LD   HL,$A000    ;FROM $A000
FLOOP2: ;CLEAR
LD (HL),$00 ;A ARRAY
INC HL
LD A,H
CP $B0 ;TO $AFFF
JR NZ,FLOOP2
LD HL,$A000 ;SOURCE RAM DISK
LD DE,$A000 ;DESTINATION RAM
LD BC,$1000 ;SIZE
RLOOP1:
PUSH AF
PUSH BC
LD A,L ;LOW VECTOR LSB
LD B,H ;HIGH VECTOR MSB
LD C,$EB ;$EB = PORT
OUT (C),A ;ADDRESS OUT
POP BC
POP AF
IN A,($EA) ;DATA IN
LD (DE),A ;RAM VECTOR
INC HL
INC DE
DEC BC
LD A,B ;BC = 0 ?
OR C
JR NZ,RLOOP1
RET

Go to download the MZ-1R18 Instruction Manual.


Go to the top of this page Home

last updated December 29, 2003
sharpmz@sharpmz.org