The Memory of PC-1360
Index
The program area

- The program area begins at 32768 and ends at 65535. The inserted memory capacity can have other sizes, so the space is divided into blocks of the size of the
RAM cards or is using two banks (0 and 1) because it is larger than this area. The area before 32768 belongs to the system. There is the display, the
ROM and some
ports.
- 8kB card: Beginning of program area at 32768, 40960, 49152 and 57344. All blocks are identical (
mapped).
- 16kB card: Beginning of program area at 32768 and 49152.
- 32kB card: Beginning of program area at 32768.
- 2 cards with more than 32kB: Beginning of program area at 32768, but with bank switching the system can access the second card, too. This will make the computer slower!
- The first
BASIC line begins at 32817, 41009, 49201 and 57393 (for 8kB card). You can edit this position and make room for data. The memory locations 65495 and 65496 contain this position: PEEK 65495+256* PEEK 65496 = start address. At this
address there must be a
byte with the value 255, then the first line follows.
- The end of the BASIC area is marked with 255, too. This address is stored in the
pointer at 65497 and 65498 (you can read this value at: 10302,10303 and 10558,10559 and 32777,32778, too. These locations are protected by the system.)
- Address of the BASIC ending position = i.e. PEEK 65498*256+ PEEK 65497 always higher than 57393 using 8kB.
- The last byte which can be used for programs without DIM variables is 63951 (-n*8192 /...)!
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 = String
array, 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).
New big characters 18*2:
Characters 18*2 lines: POKE 64775,18,2
Characters 24*4 lines: POKE 64775,24,4
Cursor position at i.e. 64777 column and line at 64778 (starting with 0)
After switch off the old 24*4 is restored!
(Using 18*2 you can get Japan symbols from ASC 166 bis 222!)
Access to the display:
There are 5 columns with each 30 pixels width in 4 lines á 8 pixels. Each stripe of 8 pixel is like a "GPRINT"
byte, the value 1 will set the top pixel and 128 the bottom pixel!
The distance of the memory locations of each column is 512 bytes, the memory is
mapped in a distance of 256 bytes.
 |
SHARP POCKET COMPUTER PC-1360
1: 10240..10269
10496..10525 |
1: +512
10752..10781
11008..11037 |
1: +1024
11264..11293
11520..11549 |
1: +1536
11776..11805
12032..12061 |
1: +2048
12288..12317
12544..12573 |
2: 10304..10333
10560..10589 |
2: 10816..10845
11072..11101 |
2:
11328..11357
11584..11613 |
2:
11840..11869
12096..12125 |
2:
12352..12381
12608..12637 |
3: 10270..10299
10526..10555 |
3: 10782..10811
11038..11067 |
3:
11294..11323
11550..11579 |
3:
11806..11835
12062..12091 |
3:
12318..12347
12574..12603 |
4: 10334..10363
10590..10619 |
4: 10846..10875
11102..11131 |
4:
11358..11387
11614..11643 |
4:
11870..11899
12126..12155 |
4:
12382..12411
12638..12667 |
|
The symbols RUN, PRO, SHIFT, SML are set in byte 12348:
Bit | Symbol |
0 | Shift |
1 | Def |
2 | - |
3 | - |
4 | Run |
5 | Pro |
6 | Japan. symbols left: Makes the keys work odd! |
7 | Sml |
System area:

- | System variables (each 8 bytes long):
Var | Address | HB | LB |
Z | 63952 | 249 | 208 |
Y | 63960 | 249 | 216 |
X | 63968 | 249 | 224 |
W | 63976 | 249 | 232 |
V | 63984 | 249 | 240 |
U | 63992 | 249 | 248 |
T | 64000 | 250 | 0 |
S | 64008 | 250 | 8 |
R | 64016 | 250 | 16 |
Q | 64024 | 250 | 24 |
P | 64032 | 250 | 32 |
O | 64040 | 250 | 40 |
N | 64048 | 250 | 48 |
M | 64056 | 250 | 56 |
L | 64064 | 250 | 64 |
K | 64072 | 250 | 72 |
J | 64080 | 250 | 80 |
I | 64088 | 250 | 88 |
H | 64096 | 250 | 96 |
G | 64104 | 250 | 104 |
F | 64112 | 250 | 112 |
E | 64120 | 250 | 120 |
D | 64128 | 250 | 128 |
C | 64136 | 250 | 136 |
B | 64144 | 250 | 144 |
A | 64152 | 250 | 152 |
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!)
|
- | Other memory locations: At 64336 to 64378 there are pieces of inputs.
At 64896 to 64991 you can read the display characters line by line: The first 24 bytes represent the first line, the next 24 the second line, etc.
System addresses:
LB | HB | Description |
&FFD7 | &FFD8 | Points to the 255 before the BASIC area |
&FFD9 | &FFDA | Points to the 255 after the BASIC area |
&FFDB | &FFDC | Points to the last block added with MERGE |
&FEF0 | &FEF1 | Points to the start of the BASIC area where the system is currently running. |
&FD04 | - | Input buffer pointer |
&FF31 | - | EOT Code ( SIO) |
&FF32 | - | Baud rate (SIO) |
&FF33 | - | F/F Interface status |
&FF34 | - | CONSOLE value |
&FEE8 | &FEE9 | Graphic cursor position X (-32768 to 32767) |
&FEEA | &FEEB | Graphic cursor position Y (-32768 to 32767) |
&FD09 | &FD0A | Text cursor position (LB->X: 0-23, HB->Y: 0-3) |
&FEEC | &FEED | End position of the last LINE (X) (-32768 to 32767) |
&FEEE | &FEEF | End position of the last LINE (Y) (-32768 to 32767) |
&FD16 | - | Cursor position in input buffer |
&FD10 | &FD11 | Display pointer (LB->X: 0-23, HB->Y: 0-3) |
&287E | &287F | WAIT counter |
&FF02 | - | ASCII code of the blinking character at the cursor |
&FF00 | &FF01 | Address of the blinking character in the display buffer |
&FE00 | - | FOR..NEXT return address in the Stack |
&FE01 | - | GOSUB..RETURN return address in the stack |
&FEE0 | - | USING format (point or comma) |
&FEE1 | - | USING integer part |
&FEE2 | - | USING character part |
&FEE3 | - | USING decimal point |
&FFDD | &FFDE | Variable pointer |
&FEF2 | &FEF3 | Address of the preceeding line |
&FEF4 | &FEF5 | BREAK address |
&FEF6 | &FEF7 | ERROR address |
&2ABD | &2ABE | DATA pointer |
&2A7E | &2A7F | Auto power off counter |
&FFF6 | &FFF7 | Beginning of the RAM card |
&FFF8 | &FFF9 | End of the RAM card |
&FF40 | to &FFCF | Reserve mode memory |
&FF3F | - | Length of all reserve mode data |
&FD20 | to &FD6F | Input buffer |
&FD80 | to &FDDF | Display as ASCII code |
&FC60 | to &FCAF | String buffer |
&FAA0 | to &FAFF | Printer buffer |
|
- | The ROM:
The PC-1360 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!
System test
By pressing R+V+7+1 together while switching on the self test menu will appear!
BASIC commands
Index position | Command | Token | Address | Bank |
22761 | ASC | 208 | 7936 | BANK: Int. ROM |
22768 | AND | 161 | 0 | BANK: ?* |
22775 | ABS | 153 | 7908 | BANK: Int. ROM |
22782 | ATN | 159 | 7896 | BANK: Int. ROM |
22789 | ASN | 157 | 7888 | BANK: Int. ROM |
22796 | ACS | 158 | 7892 | BANK: Int. ROM |
22803 | AREAD | 99 | 6222 | BANK: ?* |
22812 | AKCNV$ | 224 | 0 | BANK: ?* |
22822 | APPEND | 114 | 4288 | BANK: ?* |
22832 | AS | 115 | 4288 | BANK: ?* |
22838 | ARUN | 116 | 6222 | BANK: ?* |
22846 | AUTOGOTO | 117 | 6222 | BANK: ?* |
22858 | BEEP | 41 | 16544 | BANK: 2 |
22866 | BASIC | 54 | 16400 | BANK: 2 |
22875 | CONT | 18 | 16439 | BANK: 2 |
22883 | CONSOLE | 36 | 16418 | BANK: 4 |
22894 | CLEAR | 46 | 16409 | BANK: 2 |
22903 | CLOAD | 22 | 16421 | BANK: 4 |
22912 | CSAVE | 32 | 16424 | BANK: 4 |
22921 | COS | 150 | 7880 | BANK: Int. ROM |
22928 | CHR$ | 240 | 7940 | BANK: Int. ROM |
22936 | CLOSE | 34 | 16448 | BANK: 5 |
22945 | CALL | 49 | 31485 | BANK: ?* |
22953 | CLS | 80 | 16445 | BANK: 2 |
22960 | CHAIN | 103 | 16385 | BANK: 5 |
22969 | CURSOR | 81 | 16526 | BANK: 2 |
22979 | COPY | 61 | 16388 | BANK: 5 |
22987 | CSIZE | 67 | 16421 | BANK: 3 |
22996 | COLOR | 68 | 16418 | BANK: 3 |
23005 | CROTATE | 110 | 16412 | BANK: 3 |
23016 | CIRCLE | 111 | 16415 | BANK: 3 |
23026 | DIM | 48 | 16397 | BANK: 2 |
23033 | DEGREE | 38 | 16448 | BANK: 2 |
23043 | DEG | 155 | 7900 | BANK: Int. ROM |
23050 | DMS | 156 | 7904 | BANK: Int. ROM |
23057 | DATA | 94 | 6222 | BANK: ?* |
23065 | DSKF | 177 | 0 | BANK: ?* |
23073 | DELETE | 27 | 16385 | BANK: 2 |
23083 | END | 90 | 16451 | BANK: 2 |
23090 | EXP | 147 | 7872 | BANK: Int. ROM |
23097 | EOF | 176 | 0 | BANK: ?* |
23104 | ERASE | 58 | 16406 | BANK: 2 |
23113 | FOR | 87 | 16457 | BANK: 2 |
23120 | FILES | 28 | 16391 | BANK: 5 |
23129 | GOTO | 43 | 16460 | BANK: 2 |
23137 | GOSUB | 98 | 16463 | BANK: 2 |
23146 | GPRINT | 51 | 16466 | BANK: 2 |
23156 | GCURSOR | 104 | 16469 | BANK: 2 |
23167 | GRAD | 40 | 16472 | BANK: 2 |
23175 | GRAPH | 65 | 16427 | BANK: 3 |
23184 | GLCURSOR | 108 | 16424 | BANK: 3 |
23196 | INPUT | 97 | 16403 | BANK: 1 |
23205 | IF | 86 | 16475 | BANK: 2 |
23211 | INT | 152 | 7912 | BANK: Int. ROM |
23218 | INKEY$ | 233 | 0 | BANK: ?* |
23228 | LNIT | 29 | 17164 | BANK: ?* |
23236 | JIS$ | 226 | 0 | BANK: ?* |
23244 | KILL | 60 | 17168 | BANK: ?* |
23252 | KLEN | 211 | 0 | BANK: ?* |
23260 | KMID$ | 237 | 0 | BANK: ?* |
23269 | KLEFT$ | 238 | 0 | BANK: ?* |
23279 | KRIGHT$ | 239 | 0 | BANK: ?* |
23290 | KACNV$ | 225 | 0 | BANK: ?* |
23300 | LIST | 20 | 17031 | BANK: ?* |
23308 | LLIST | 21 | 17131 | BANK: ?* |
23317 | LPRINT | 100 | 17135 | BANK: ?* |
23327 | LOG | 146 | 0 | BANK: ?* |
23334 | LOF | 178 | 0 | BANK: ?* |
23341 | LOC | 179 | 0 | BANK: ?* |
23348 | LN | 145 | 7932 | BANK: Int. ROM |
23354 | LOAD | 24 | 17176 | BANK: ?* |
23362 | LINE | 105 | 16899 | BANK: ?* |
23370 | LET | 88 | 16903 | BANK: ?* |
23377 | LEN | 210 | 0 | BANK: ?* |
23384 | LEFT$ | 235 | 0 | BANK: ?* |
23393 | LFILES | 59 | 17172 | BANK: ?* |
23403 | LTEXT | 64 | 17082 | BANK: ?* |
23412 | LF | 66 | 17078 | BANK: ?* |
23418 | LLINE | 106 | 17074 | BANK: ?* |
23427 | MEM | 175 | 0 | BANK: ?* |
23434 | MID$ | 234 | 0 | BANK: ?* |
23442 | MERGE | 23 | 17196 | BANK: ?* |
23451 | MDF | 128 | 0 | BANK: ?* |
23458 | NEXT | 91 | 16907 | BANK: ?* |
23466 | NAME | 62 | 17180 | BANK: ?* |
23474 | NOT | 163 | 0 | BANK: ?* |
23481 | NEW | 17 | 16911 | BANK: ?* |
23488 | ON | 85 | 16995 | BANK: ?* |
23494 | OPEN | 33 | 17184 | BANK: ?* |
23502 | OPEN$ | 232 | 0 | BANK: ?* |
23511 | OR | 162 | 0 | BANK: ?* |
23517 | OUTPUT | 113 | 4288 | BANK: ?* |
23527 | PRINT | 96 | 16804 | BANK: ?* |
23536 | PASS | 19 | 16915 | BANK: ?* |
23544 | PI | 174 | 0 | BANK: ?* |
23550 | PEEK | 164 | 0 | BANK: ?* |
23558 | POKE | 50 | 31586 | BANK: ?* |
23566 | POINT | 173 | 0 | BANK: ?* |
23575 | PSET | 52 | 16919 | BANK: ?* |
23583 | PRESET | 53 | 16923 | BANK: ?* |
23593 | PAUSE | 95 | 16808 | BANK: ?* |
23602 | PAINT | 112 | 17086 | BANK: ?* |
23611 | RUN | 16 | 16927 | BANK: ?* |
23618 | RETURN | 101 | 16999 | BANK: ?* |
23628 | READ | 93 | 16931 | BANK: ?* |
23636 | RESTORE | 102 | 16935 | BANK: ?* |
23647 | RND | 160 | 7920 | BANK: Int. ROM |
23654 | RANDOM | 37 | 29480 | BANK: ?* |
23664 | RIGHT$ | 236 | 0 | BANK: ?* |
23674 | RADIAN | 39 | 16939 | BANK: ?* |
23684 | REM | 89 | 6202 | BANK: ?* |
23691 | RENUM | 25 | 16979 | BANK: ?* |
23700 | RLINE | 107 | 17090 | BANK: ?* |
23709 | STOP | 92 | 17003 | BANK: ?* |
23717 | SQR | 148 | 7924 | BANK: Int. ROM |
23724 | SIN | 149 | 7876 | BANK: Int. ROM |
23731 | SGN | 154 | 7916 | BANK: Int. ROM |
23738 | STR$ | 241 | 7944 | BANK: Int. ROM |
23746 | SAVE | 35 | 17188 | BANK: ?* |
23754 | STEP | 83 | 4288 | BANK: ?* |
23762 | SET | 63 | 17192 | BANK: ?* |
23769 | SORGN | 109 | 17094 | BANK: ?* |
23778 | THEN | 84 | 4288 | BANK: ?* |
23786 | TAN | 151 | 7884 | BANK: Int. ROM |
23793 | TEXT | 55 | 16943 | BANK: ?* |
23801 | TRON | 44 | 16947 | BANK: ?* |
23809 | TROFF | 45 | 16951 | BANK: ?* |
23818 | TO | 82 | 4288 | BANK: ?* |
23824 | USING | 47 | 16955 | BANK: ?* |
23833 | VAL | 209 | 7948 | BANK: Int. ROM |
23840 | WAIT | 42 | 16959 | BANK: ?* |
23848 | WIDTH | 56 | 17007 | BANK: ?* |
|
- | The CPU and Gate Array:
CPU

Gate Array

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