The Memory of PC-1475


Index


The program area



Line structure:

3 bytes (x,y,z), data, return (Chr 13)
x,y: line number = x*256+y
z: length of data (return included)
End of program Chr (255)
The byte 254 in data of a line means a command which is defined by the following byte.

Variable structure (DIM):

7 bytes (a,b,c,d,e,f,g), Data
In 65502*256+65501 the start address of the variables is stored.
The last position where variables are stored: 63951
Variables are written from behind, this means that a new variable is written before the older variables. The start address points to the header of the newest variable.
You can rename variables using POKE!

Header structure:

7 bytes lengthy

Example: Bytes are named a-g
G$(5,5)*3
a: 71 = G: variable name
b: 160 = String
c: 0 = 1.Byte * 256
d: 111 = + 2.Byte = Overall length + 3 (because of following DIM values)
e: 5 = Dim 5
f: 5 = , 5
g: 3 = * 3
DATA:71= 1. character data

Meaning of the second header byte:

1-26 = Stringarray, 2 character name with second character = Chr (Byte+64)
193-218 = Number array, 2 character name with second char = Chr (Byte-128)
129-154 = String, 2 character name [Chr (Byte-64)] variable (like NE$="test") always 16 bytes lengthy
65-90 = Number, 2 character name [Chr (Byte)] (like AA=0) always 8 byte lengthy
128: One character name number array
160: One character name string array

Data of a variable:

Strings contain each character as a byte in ASCII code, Chr(0) is the end of a string. The Chr(0) is not used when the text is as long as the variable is dimensioned.
Numbers are stored in the BCD format. Each number needs 7 bytes.
In an array the single variables are following without any divider character. The position of such a variable is calculated using the header data. In a twodimensional array the arrays are following in a similar way: DIM B$(1,2)*1: B$(0,0) B$(0,1) B$(0,2) B$(1,0) B$(1,1) B$(1,2).

Access to the display:

There are 24 characters in two lines, each character has 5*7 pixel and needs 5 bytes. The first bit is the most upper pixel bit 6 the lowest.

  SHARP  POCKET COMPUTER PC-1475
10240 bis 10299
10496 to 10555
The first 12 characters of the 1. line
10304 bis 10363
10560 to 10619
The first 12 characters of the 2. line
10752 bis 10811
11008 to 11067
The second 12 characters of the 1. line
10816 bis 10875
11072 to 11131
The second 12 characters of the 2. line


The symbols BATT, (), HYP, RSV, PRO, RUN and CAL are controlled in byte 10300 or 10556:

BitSymbol
0BATT
1()
2HYP
3RSV
4PRO
5RUN
6CAL
7-

The symbols BUSY, DEF, SHIFT and DBL are controlled in byte 10301 or 10557:

BitSymbol
0BUSY
1DEF
2SHIFT
3DBL
4-
5-
6-
7-

The symbols E, M, RAD, G, MATRIX, STAT and PRINT are controlled in byte 10364 or 10620:

BitSymbol
0E
1M
2RAD
3G
4MATRIX
5STAT
6PRINT
7-

The symbols µt, /|\, SML and DE are controlled in byte 10365 or 10621:

BitSymbol
0µt (jap. symbols)
1/|\ (jap. symbol)
2SML
3DE
4-
5-
6-
7-



System area:




-System variables (each 8 bytes long):
VarAddressHBLB
Z63952249208
Y63960249216
X63968249224
W63976249232
V63984249240
U63992249248
T640002500
S640082508
R6401625016
Q6402425024
P6403225032
O6404025040
N6404825048
M6405625056
L6406425064
K6407225072
J6408025080
I6408825088
H6409625096
G64104250104
F64112250112
E64120250120
D64128250128
C64136250136
B64144250144
A64152250152
The first byte of each variable is CHR 245 when containing a string or CHR 0 when containing a number. If the string is shorter than 7 characters, a Chr(0) is added at the end!

-  Reserve mode data: 65343:A:first reserve entry, Chr (alphabetical number) marks beginning (A=1,S=19,D=4,...,' '=27,'='=28), then data without any ending code. Example: [1,254,34],[19,...],...
Order:ASDFGHJKL'='' 'MNBVCXZ, empty entries are not stored (not even the start code 1-28!)

-  System addresses:

LBHBDescription
&FFD7&FFD8BASIC start location
&FFD9&FFDABASIC end location
&FFDB&FFDCLast with MERGE added program block
&FF31-EOT Code (SIO)
&FF32-Baud rate (SIO)
&FF33-F/F interface state
&FD04-Input buffer pointer
&FFDD&FFDEVariable pointer
&FF34-CONSOLE value
&2A7E
or &2B7E
&2A7F
or &2B7F
WAIT counter
&FFDD&FFDEVariable pointer
&FF02-ASCII code of the blinking character
&FF00&FF01Address of the blinking character in the display buffer
&FFF6&FFF7Start of RAM card
&FFF8&FFF9End of RAM card
&FE80to &FEAFContent of display in ASCII
&FD20to &FD6FInput buffer

-  The ROM: The PC-1475 has a ROM, which contains the operating system. The ROM of the CPU is at &0000 to &1FFF, the banks are at &4000 to &7FFF. You can change the bank writing the according number (0..7) at the address &3400. If you know the system calls you can use functions of the system!




Copyright © Simon Lehmayr (Parts of my page were made with the help of Laurent Duveau)
If this page has no navigation, click here.
Impressum