GER

System description and routines PC-1350 / PC-1360

ENG
Sharp PC-1350/PC-1360 system description
Organization of the PC-1350 system memory:
  • Memory:
    PC-1350 Speicher
     
  • Display memeory:
    PC-1350 Display
In the display memory (&7000-&78FF) no program execution is possible. In the memory that's not used for the display data can be stored.
In general the second block of 256 byte (e.g. &7100-&71FF) is a mirror of the first block (e.g. &7000-&70FF).
The ports and the system usage of this ram is shown in the following sections.
 
A memory card uses address area from &2000-&5FFF.
Depening on the system configuration basic uses the internal ram and the ram form a memory card in different ways.
The configuariotn of the memory can be shown by using the command MEM$ and can be changed using the command MEM "B"/"C".
  • Without memory card:
    MEM "C"The internal ram is used for basic program, variables and system area.
  • With memory card:
    MEM "B"The internal ram and the memeory card are used for basic program and variables.
    MEM "C"The memory card is used for basic program and variables.
  • "System area" describes the part of the memory used by the ROM (&6C30-&6FFF). This always uses the internal ram.
Memeory access when using assebler code:
Some of the ROM and RAM can't be accessed with all accessing method available by the CPU.
addressdescriptionaccess (read)
0000-1FFFint. ROM(AE) / not with S, X
2000-5FFFram-cardS, X and (AE)
6000-6FFFint. ROMS, X and (AE)
7000-7FFFdisplay/portsS, X / not with (AE)
8000-FFFFext. ROMS, X and (AE)

 
ROM version:
There are (at least) two known ROM versions of the PC-1350. You can test the version of your own PC-1350 by calling PEEK &FFF0
VersionResult of PEEK &FFF0
v0CE (Decimal: 206)
v103 (Decimal: 3)
Organization of the PC-1360 system memory:
  • Memory:
    PC-1360 Speicher
     
  • Display memory:
    PC-1360 Display
In the display memory (&2800-&30FF) no program execution is possible. In the memory that's not used for the display data can be stored.
In general the second block of 256 byte (e.g. &2900-&29FF) is a mirror of the first block (e.g. &2800-&28FF.
The ports and the system usage of this ram is shown in the following sections.
 
The memory card in slot 1 is mapped to ram bank 0, the card n slot 2 to ram bank 1.
Depening on the system configuration basic uses the ram card in different ways.
The configuariotn of the memory can be shown by using the command MEM$ and can be changed using the command SET MEM "B"/"C"/"D".
  • One memory card in slot 1:
    SET MEM "C"Card in slot 1 is used for basic program, variables and system area.
  • With two memor cards:
    SET MEM "B"Cards in slot 1+2 are used for basic program and variables. The system area is in slot 2.
    SET MEM "C"Card in slot 1 is used for basic program, variables and system area.
    SET MEM "D"Card in slot 1 is used for basic program, card in slot 2 is used for variables and system area.
  • "System area" describes the part of the memory used by the ROM (&F9D0-&FFFF).
Memeory access when using assebler code:
Some of the ROM and ram can't be accessed with all accessing method available by the CPU.
addressdescriptionaccess (read)
0000-1FFFint. ROM(AE) / not with S, X
2000-3FFFdisplay/portsS, X / not with (AE)
4000-7FFFext. ROMS, X and (AE)
8000-FFFFram-cardS, X and (AE)

 
ROM version:
There are (at least) three known ROM versions of the PC-1360. You can test the version of your own PC-1360 by calling PEEK &7FFF
VersionErgebnis von PEEK &7FFF
101 (Dezimal: 1)
303 (Dezimal: 3)
505 (Dezimal: 5)

 
System ram
  • Introduction
    The following ram area is used by the basic of the PC-1350/PC-1360.
     
  • RAM PC-1350/PC-1360
    address
    PC-1350
    address
    PC-1360
    len description
    283C2TEXT BOTTOM; max address for the basic program
    283E2VARIABLE BOTTOM; minimum address for variables created with DIM.
    70B3287E2WAIT-interval
    2A7E2counter for auto power off
    2A8024manual display buffer (output in RUN mode)
    74802A9824print buffer for CE-126P
    6F202AB42address of the last read byte when executing a basic program
    2ABD2pointer DATA-1 for RESTORE
    2E7C1basic configured for logical address (0..65535)
    2E802poniter stack-1 for bank+return address when calling ext.ROM from int.ROM
    2E82??stack for bank+return address when calling ext.ROM from int.ROM
    783C303C1staus display
    bit 0: shift
    bit 1: def
    bit 2: printer (not on PC-1350/PC-1360)
    bit 3: reserve mode
    bit 4: run mode
    bit 5: program mode
    bit 6: japan mode
    bit 7: sml
    787C307C1mode of angular measurements
    bit 0: DEGREE
    bit 1: RADIAN
    bit 2: GRAD
    bit 3:
    bit 4:
    bit 5:
    bit 6:
    bit 7:
    6F6330A82line: start X
    6F6530AA2line: start Y
    6F6730AC2line: end X
    6F6930AE2line: end Y
    34001current ROM bank
    38001strobe
    3A001bit 0: IO1 (out)
    bit 1: IO2 (out)
    bit 2: Dout (out)
    bit 3: Din (out)
    bit 4: ACK (out)
    bit 5: data transmit ready (RS232)
    bit 6: ready to receive (RS232)
    bit 7: request to send
    3E001bit 0: keyboard
    bit 1: keyboard
    bit 2: keyboard
    bit 3: export bridge
    6C30F9D08Z ; Z$ ; A(26) ; A$(26)
    6C38F9D88Y ; Y$ ; A(25) ; A$(25)
    6C40F9E08X ; X$ ; A(24) ; A$(24)
    6C48F9E88W ; W$ ; A(23) ; A$(23)
    6C50F9F08V ; V$ ; A(22) ; A$(22)
    6C58F9F88U ; U$ ; A(21) ; A$(21)
    6C60FA008T ; T$ ; A(20) ; A$(20)
    6C68FA088S ; S$ ; A(19) ; A$(19)
    6C70FA108R ; R$ ; A(18) ; A$(18)
    6C78FA188Q ; Q$ ; A(17) ; A$(17)
    6C80FA208P ; P$ ; A(16) ; A$(16)
    6C88FA288O ; O$ ; A(15) ; A$(15)
    6C90FA308N ; N$ ; A(14) ; A$(14)
    6C98FA388M ; M$ ; A(13) ; A$(13)
    6CA0FA408L ; L$ ; A(12) ; A$(12)
    6CA8FA488K ; K$ ; A(11) ; A$(11)
    6CB0FA508J ; J$ ; A(10) ; A$(10)
    6CB8FA588I ; I$ ; A(09) ; A$(09)
    6CC0FA608H ; H$ ; A(08) ; A$(08)
    6CC8FA688G ; G$ ; A(07) ; A$(07)
    6CD0FA708F ; F$ ; A(06) ; A$(06)
    6CD8FA788E ; E$ ; A(05) ; A$(05)
    6CE0FA808D ; D$ ; A(04) ; A$(04)
    6CE8FA888C ; C$ ; A(03) ; A$(03)
    6CF0FA908B ; B$ ; A(02) ; A$(02)
    6CF8FA988A ; A$ ; A(01) ; A$(01)
    FAA096output buffer for CE-126P
    6D60FB00160output buffer (tokens) / SIO-buffer
    6DE0FB9032buffer for string operations with OPEN$
    7680FC0064operand stack
    FC2032buffer for conversion text to tokens (input mode)
    FC4032operator stack
    6E60FC6080stringbuffer
    FCB032buttef for generation OPEN$
    6F24FCB42last char+1 in input-buffer (during manual input)
    FD041cursor address in input-buffer
    FD071max count of chars per line: 24 (jap: 18)
    FD081max count of lines: 4 (jap: 2)
    7881FD091CURSOR X (0..23) for PRINT
    7880FD0A1CURSOR Y (0..3) for PRINT
    6F62FD0F1drawing mode for LINE/PSET/PRESET
    bit 0: ,S
    bit 1: ,R
    bit 2: ,X
    bit 3: ,B
    bit 4: ,BF
    pattern
    bit 6:
    bit 7:
    FD101actual cursor-position X
    FD111actual cursor-position X
    7885FD131buffer for line number index (0..3) for output
    6F2AFD161last char-1 in input-buffer
    6EB0FD2080input-buffer
    6D00FD8096displaybuffer
    7298FDE08last RND 0 value (different BCD format within exponent
    FDE88buffer for FAC 1 for ROM routines
    FDF08buffer for FAC 2 for ROM routines
    6F2BFE001next free entry in FOR-NEXT stack
    6F2CFE011next free entty in GOSUB stack
    6F2E1function stack pointer
    6F301functiob operater number
    6F381input buffer cursor
    6E06FE022for loop 1: pointer to loop variable-1 (LO/HI)
    6E08FE047for loop 1: end value (BCD)
    6E0FFE0B7for loop 1: step value (BCD)
    6E16FE122for loop 1: pointer callback (LO/HI)
    6E18FE142for loop 2: pointer to loop variable-1 (LO/HI)
    6E1AFE167for loop 2: end value (BCD)
    6E21FE1D7for loop 2: step value (BCD)
    6E28FE242for loop 2: pointer callback (LO/HI)
    6E2AFE262for loop 3: pointer to loop variable-1 (LO/HI)
    6E2CFE287for loop 3: end value (BCD)
    6E33FE2F7for loop 3: step value (BCD)
    6E3AFE362for loop 3: pointer callback (LO/HI)
    6E3CFE382for loop 4: pointer to loop variable-1 (LO/HI)
    6E3EFE3A7for loop 4: end value (BCD)
    6E45FE417for loop 4: step value (BCD)
    6E4CFE482for loop 4: pointer callback (LO/HI)
    6E4EFE4A2for loop 5: pointer to loop variable-1 (LO/HI)
    6E50FE4C7for loop 5: end value (BCD)
    6E57FE537for loop 5: step value (BCD)
    6E5EFE5A2for loop 5: pointer callback (LO/HI)
    7090FE5C2GOSUB: callback-1 for 1st sub routine
    7092FE5E2GOSUB: callback-1 for 2nd sub routine
    7094FE602GOSUB: callback-1 for 3rd sub routine
    7096FE622GOSUB: callback-1 for 4th sub routine
    7098FE642GOSUB: callback-1 for 5th sub routine
    709AFE662GOSUB: callback-1 for 6th sub routine
    709CFE682GOSUB: callback-1 for 7th sub routine
    709EFE6A2GOSUB: callback-1 for 8th sub routine
    70A0FE6C2GOSUB: callback-1 for 9th sub routine
    70A2FE6E2GOSUB: callback-1 for 10th sub routine
    70A88last result of a arithmetric or logicel function
    6F3FFE711buffer for stack pointer (SP) during basic command execution
    FE771pointer operator stack (&FC40)
    6F2DFE781pointer opernad stack (&FC00)
    6F2FFE791pointer stringbuffer (&FC60)
    FE7A1pointer ???-stack (&FC50)
    6F39FEE01USING: flags
    bit 0:
    bit 1:
    bit 2:
    from of exponent
    bit 4:
    bit 5:
    bit 6:
    bit 7:
    6F3AFEE11USING: number of INT digits
    6F3BFEE21USING: string
    6F3CFEE31USING: position of decimal separator
    6F40FEE82GCURSOR X (-32768 - 32767)
    6F42FEEA2GCURSOR Y (-32768 - 32767)
    6F5CFEEC2end X of last LINE
    6F5EFEEE2end Y of last LINE
    FEF02start of currently edited basic program
    FEF22address of the last edited basic line
    74982cursor polition in basic RAM for editor
    749AFEF42pointer next command-1 for CONT
    749CFEF62address in basic program with error
    FF002address of blinking cursor in display memory
    FF021char under the binking cursor
    6F59FF0D1constant &79 (JMP)
    6F5AFF0E2address to call from ROM
    7280FF1024buffer to convert REAL -> ASCII
    6F55FF2E2pointer RSM memory
    78B0FF301SIO flags
    bit 0:
    bit 1:
    bit 2:
    bit 3:
    bit 4:
    bit 5:
    transfer finished
    bit 7: SIO is OPEN
    78B1FF311SIO: textendcode
    78B2FF321SIO:falgs baud-rate
    bit 0: 300 Baud
    bit 1: 600 Baud
    bit 2: 1200 Baud
    bit 3:
    bit 4:
    bit 5:
    bit 6: Transmitting EOL
    bit 7: Transmitting EOT
    78B3FF331SIO: SIO-Parameter
    bit 0: LF
    bit 1: CR + LF
    bit 2: CR
    transmitting a basic program
    bit 4: Stop-Bits: 0=1 Bit, 1=2 Bit
    bit 5: Paraity (in combination with Bit 6)
    bit 6: Parity: 00=None, 01=Odd, 11=Even
    Number ob bits: 0=7 bit, 1=8 bit
    FF341SIO: console length
    6F6FFF3F144RSV memory
    6FFFFFCF1mask &FF to detect end of RSV memory
    FFD06&20..&25 start parameter block
    6F00FFD61flag for memory
    6F01FFD72start basic program
    6F03FFD92end basic program
    6F05FFDB2start last MERGE block
    6F07FFDD2start variables
    6F09FFDF8password as string (first char is &F5)
    6F12FFE81Flags:
    bit 0:
    bit 1:
    bit 2:
    bit 3: PRINT = LPRINT
    bit 4:
    bit 5:
    bit 6:
    bit 7:
    6F13FFE91Flags:
    bit 0:
    bit 1:
    WAIT without value
    bit 3:
    bit 4:
    bit 5:
    bit 6:
    bit 7:
    FFEA1Flags for input
    bit 0:
    ERROR mode (only cursor keys and CE/CLS)
    bit 2:
    program line input mode
    line with error was shown
    bit 5: PASS on
    bit 6:
    bit 7:
    6F141Flags:
    bit 0:
    bit 1:
    bit 2:
    bit 3:
    bit 4:
    bit 5: PASS on
    bit 6:
    bit 7:
    6F151Flags for keyboard
    bit 0: All keys available
    ERROR mode (only cursor keys and CE/CLS)
    program stopped with WAIT
    RSV editing mode
    bit 4:
    program line input mode
    bit 6:
    bit 7:
    6F16FFEC1Flags
    bit 0:
    bit 1:
    bit 2:
    bit 3:
    bit 4:
    bit 5:
    TEXT mode active
    Japen mode active
    6F171Flags
    bit 0:
    bit 1:
    no line feed for PRINT
    bit 3:
    bit 4:
    bit 5:
    bit 6:
    bit 7:
    FFF02RAM start +&30 (for 32K &8030)
    FFF22start of standard variables
    FFF62logical address start of basic memory
    FFF82logical address end of basic memory
Internal ROM
  • Introduction
    These are the procedures from the internal ROM in the PC-1360
    Afaik the addresses are identicle for ROM version 3 and 5.
    PC-1350: The internal ROM for ROM version 0 und 1 are identicle.
     
  • Internal ROM &0000 - &1FFF
    address
    PC-1350
    address
    PC-1360
    description
    043600B5keyboard input (PC-1360: identicle to 1E9C); see 46C0 ROM-bank 0
    804E0594FAC 1 = FAC 2 ^ FAC 1; (*01)(*01b)
    11B0088AFAC 1 = (18/19); range 0 to 65535 (*01)(*01a)
    11B70891FAC 1 = (18/19); range -32768 to 32767 (*01)(*01a)
    162B090E(18) = FAC 1; range 0 to 255 (*01)(*01a)
    162F0912(18/19) = FAC 1; range -32768 to 32767 (*01)(*01a)
    163A091D(18/19) = FAC 1; range 0 to 65535 (*01)(*01a)
    01AD0A74FAC 1 = FAC 2 incl. sign in (31) (*01)(*01a)
    01B60A7DFAC 1 = FAC 2 (*01)(*01b)
    01D50A82FAC 1 = FAC 3 incl. sign in (31) (*01)(*01a)
    01DE0A8BFAC 1 = FAC 3 (*01)(*01b)
    01BB0A90FAC 1 = FAC 4 incl. sign in (31) (*01)(*01a)
    01C40A99FAC 1 = FAC 4 (*01)(*01b)
    01C90AA0FAC 2 = FAC 1 incl. sign in (31) (*01)(*01a)
    01D20AA9FAC 2 = FAC 1 (*01)(*01b)
    019F0AAEFAC 2 = FAC 4 incl. sign in (31) (*01)(*01a)
    01A80AB7FAC 2 = FAC 4 (*01)(*01b)
    01E60ABAFAC 3 = FAC 1 incl. sign in (31) (*01)(*01a)
    01EF0AC3FAC 3 = FAC 1 (*01)(*01b)
    01F20AC6FAC 4 = FAC 1 incl. sign in (31) (*01)(*01a)
    01FB0ACFFAC 4 = FAC 1 (*01)(*01b)
    01930AD2FAC 4 = FAC 2 incl. sign in (31) (*01)(*01a)
    019C0ADBFAC 4 = FAC 2 (*01)(*01b)
    01E30ADEFAC 3 = FAC 2 (*01)(*01b)
    02020B8AFAC 1 <-> FAC 2 incl. sign in (31) (*01)(*01a)
    020F0B97FAC 1 <-> FAC 2 (*01)(*01b)
    013F0BDBFAC 1 = 0; (31) incl. sign in (31) (*01)(*01a)
    01420BDEFAC 1 = 0 (*01)(*01b)
    01330BE5FAC 2 = 0; (31) incl. sign in (31) (*01)(*01a)
    01390BEBFAC 3 = 0; (31) incl. sign in (31) (*01)(*01a)
    01660BF1Mantissa from FAC 1 = 0; sign and exp. are not changed (*01)
    01600BFBMantissa from FAC 2 = 0; sign and exp. are not changed (*01)
    01630BFEMantissa from FAC 4 = 0; sign and exp. are not changed (*01)
    017D0C01sign and exp. from FAC 1 = 0 (*01)(*01b)
    017A0C08sign and exp. from FAC 2 = 0 (*01)(*01b)
    01530C0BFAC 2 = 1 incl. sign in (31) (*01)(*01a)
    06B90C18FAC 2 = 0.6 incl. sign in (31) (*01)(*01a)
    07320C24constants for type of angle conversion:
    DEG: FAC 2 = 0.434294481903 incl. sign in (31) (*01)(*01a)
    GRAD: FAC 2 = 0.9 incl. sign in (31) (*01)(*01a)
    RAD: FAC 2 = 57.2957795131 incl. sign in (31) (*01)(*01a)
    0BEC0C54FAC 2 = PI = 3.141592653 incl. sign in (31) (*01)(*01a)
    03010D42(31)=sign FAC 1 and FAC 2; (FE71)=SP+2 (PC-1350: (6F3F)=SP+2); (30)=00 (*01)(*01b)
    03100D64(31)=sign FAC 1; (FE71)=SP+2 (PC-1350: (6F3F)=SP+2); (30)=00 (*01)(*01b)
    03280D69sign from (31) -> FAC 1 and FAC 2 (*01)(*01b)
    03330D74sign from (31) -> FAC 1 (*01)(*01b)
    10E410B9ERROR 2
    10EC10C0ERROR 1
    10F010C8ERROR 3
    10F410CDERROR 4
    10F810D2ERROR 5
    10FC10D7ERROR 6
    10E610BBERROR A (1 <= A <= 9)
    110010DCERROR 7
    110410E1ERROR 8
    110810E6ERROR 9
    027D1108D = AE
    0282110DS = AE
    02871112S = AE+1
    028D1118D = AE+1
    0297111ES = AE-1
    02B51124D = AE-1
    1414112AD = S
    1419112FS = D
    15531134(0C/0D) = S
    15581139(0C/0D) = D
    113ED <-> (0C/0D)
    161A1143S <-> (0C/0D)
    170E1148A = (0A); (0A) = (06)
    1713114D(0B) = (06); A = (06)
    115C1153push S
    1167115Epop S
    141E1188(38/39) = S
    140B1192S = (38/39)
    108E1197S <-> (38/39)
    119CS <-> D
    11A611A1S = (1D/1E)-1 == STR 2 (*01)
    11AA11A5S = (15/16)-1 == STR 1 (*01)
    98B011ABAE = (FFDB/DC) (PC:1350: 6F05/06) start of last MERGE-block
    98B611B1AE = (FFD9/DA) (PC:1350: 6F03/04) end of basic memory
    029311B7S = FD1F (PC-1350: 6EAF) Inputbuffer (ASCII or token)
    029D11C1S = FBFF (PC-1350: 767F) operand-stack
    02A311C7S = FD7F (PC-1350: 6CFF) displaybuffer
    02AA11CED = FD7F (PC-1350: 6CFF) displaybuffer
    02B111D5D = FD1F (PC-1350: 6EAF) inputbuffer
    02BB11DFD = FBFF (PC-1350: 767F) operand-stack
    11E5S = (FEF0/F1) start basic programm
    147111EBS = (FFD7/D8) (PC-1350: 6F01/02) start basic memory
    11F1(FFDB/DC) = (FFD7/D8) using AE
    11FC(FEF0/F1) = (FFDB/DC) using AE
    1207(FEF0/F1) = (FFD7/D8) using (0A/0B)
    1D841212(2AB4/B5) = S (PC-1350: (6F20/21) = S); save S for analyse basic program (*03)
    1D891217S = (2AB4/B5) (PC-1350: S = (6F20/21)); S = restore address at end of basic-command (*03)
    11751233E mal (+D) = (+S)
    1265FDE8..EF = 00 temp memory for FAC 1 (*01)
    126EFAC 4 = FAC 1 (*01)(*01b)
    1275FAC 1 = FAC 4 (*01)(*01b)
    127CFAC 2 = FAC 1 (*01)(*01b)
    12DBA = (+S) from both RAM bank (*02)
    12FCA = (-S) from both RAM bank (*02)
    131B(+D) = A to both RAM bank (*02)
    133C(-D) = A to both RAM bank (*02)
    13A3(5E) AND FB; PC AND FB; activate RAM bank 0
    13A9(5E) OR 04; PC OR 04; activate RAM bank 1
    13AFwait A * 2 ms
    09E813B7wait 6 ms
    04AD13C4CR = 00; display off
    04B113C8CR = 01; display on
    1441FAC 1 = 00; FAC 2 = 00; FAC 3 = 00 (*01)(*01b)
    1C441448FD80..AF = 20 (PC-1350: 6D00..6D2F); clear 1.+2. line of displaybuffer
    1C3F144DFD98..AF = 20 (PC-1350: 6D18..6D2F); clear 2nd line of displaybuffer
    1C361452FD80..97 = 20 (PC-1350: 6D00..6D17); clear 1st line of displaybuffer
    1D3B1483(10)..(27) <-> FDC8..DF (PC-1350: 6D48..5F); 4th line .Zeileof displaybuffer
    1D43148B(10)..(27) <-> FD80..97 (PC-1350: 6D00..17); 1st line of displaybuffer
    1D481490(10)..(27) <-> FD98..AF (PC-1350: 6D18..2F); 2nd line of displaybuffer
    1D4D1495(10)..(27) <-> FDB0..C7 (PC-1350: 6D30..47); 3rd line of displaybuffer
    1E0C14B6FD80..DF = 20 (PC-1350: 6D00..5F); clear displaybuffer (24x4)
    14BFFD80..A3 = 20 (PC-1350: 6D00..23); clear displaybuffer (18x2)
    1C1C14C8FD20..6F = 0D (PC-1350: 6EB0..FF); clear input-buffer
    1517BIT(FF30),80; SIO open
    15C52A98..AF = 00; printer-buffer CE-126P
    1CD016B5D = address display memory -1 for line A 2800/2840/281E/285E (PC-1350: 7000/7040/701E/705E)
    1CEF16D4D = address display memory-1 for cursor X=(FD10)/Y=(FD11) (PC-1350: X=7881/Y=7880)
    1D5A1710D = address displaybuffer according line for cursor Y=(FD11) (PC-1350: 7880)
    1D701726D = FD80 (PC-1350: 6D00); 1st line displaybuffer
    1D741731D = FD98 (PC-1350: 6D18); 2nd line displaybuffer
    1735D = FD92; 2nd line displaybuffer (18x2)
    1D781739D = FDB0 (PC-1350: 6D30); 3rd line displaybuffer
    1D7C173DD = FDC8 (PC-1350: 6D48); 4th line displaybuffer
    15EC17C4FEE0..E3 = 00 (PC-1350: 6F39..3C); clear USING-format
    141018A3CMP (14),D0; test FAC 1 for string
    D98618ADA = '<' or '>', depending on bit 6 from (&FFEC; PC-1350: &6F16); TEXT-mode
    10C118D9FAC 1 = (POP value operand-stack (&FC00; PC-1350: &7680)) (*01)(*01b)
    10AA18DDFAC 2 = (POP value operand-stack (&FC00; PC-1350: &7680)) (*01)(*01b)
    173719B0(+D) = 2D; -""
    19F7(P) = 0; (P+1) = 0
    1DF31A18display line, A=0..3, A=4->line 0..3, see ROM bank 1, 4004
    805A1E80FAC 1 = FAC 2 + FAC 1 (*01), PC-1360:(*01a), PC-1350:(*01b)
    80571E84FAC 1 = FAC 2 - FAC 1 (*01), PC-1360:(*01a), PC-1350:(*01b)
    80601E88FAC 1 = FAC 2 * FAC 1 (*01), PC-1360:(*01a), PC-1350:(*01b)
    80661E8CFAC 1 = FAC 2 / FAC 1 (*01), PC-1360:(*01a), PC-1350:(*01b)
    04B11E94enable display == JP,13C8
    04AD1E98disable display == JP,13C4
    04361E9Ckeyboard input (PC-1360: identicle to 1E9C); see 46C0 ROM-bank 0
    89AC1EC0FAC 1 = EXP(FAC 1) (*01)(*01a)
    89BA1EC4FAC 1 = SIN(FAC 1) (*01)(*01a)
    89C11EC8FAC 1 = COS(FAC 1) (*01)(*01a)
    89C81ECCFAC 1 = TAN(FAC 1) (*01)(*01a)
    89CF1ED0FAC 1 = ASN(FAC 1) (*01)(*01a)
    89D61ED4FAC 1 = ACS(FAC 1) (*01)(*01a)
    89DD1ED8FAC 1 = ATN(FAC 1) (*01)(*01a)
    89EB1EDCFAC 1 = DEG(FAC 1) (*01)(*01a)
    89F21EE0FAC 1 = DMS(FAC 1) (*01)(*01a)
    8E9F1EE4FAC 1 = ABS(FAC 1) (*01)(*01a)
    8E7B1EE8FAC 1 = INT(FAC 1) (*01)(*01a)
    8A001EECFAC 1 = SGN(FAC 1) (*01)(*01a)
    89F91EF0FAC 1 = RND(FAC 1) (*01)(*01a)
    89B31EF4FAC 1 = SQR(FAC 1) (*01)(*01a)
    89A51EF8FAC 1 = LOG(FAC 1) (*01)(*01a)
    899D1EFCFAC 1 = LN(FAC 1) (*01)(*01a)
    8B1E1F00FAC 1 = ASC(STR 1) (*01)(*01a)
    8B3E1F04STR 1 = CHR$(FAC 1) (*01)(*01a)
    8BA61F08STR 1 = STR$(FAC 1) (*01)(*01a)
    8C021F0CFAC 1 = VAL(STR 1) (*01)(*01a)
    142Bactivate RAM bank 1
    1438activate RAM bank 0
    144D(+S) from RAM bank 0 (S < &8000) or bank 1 (S >= &8000)
    1454if S >= &8000 then activate RAM bank 1
    153BX = 783C (status display)
    (*01) The following internal variables/addresses are used:
    variableaddressnumber sign
    FAC 110..17(31) bit0 = &01 if mantissa is negative
    FAC 218..1F(31) bit1 = &02 if mantissa is negative
    FAC 320..27(31) bit2 = &04 if mantissa is negative
    FAC 428..2F(31) bit3 = &08 if mantissa is negative
    STR 114 = D0
    15 = address LO
    16 = address HI
    17 = length
    STR 21C..1F

    FAC 1..4 are in BCD format like it's used for numeric variables
    (31) und collon 'number sign': see also (*01a) and (*01b)
    Each function meight destroy FAC 1..4 (STR 1..2) during operation. They meight be used for internal calculations.
    (The flags (33) and (37) that are used within rou rountes donät have to be set when calling a ROM function. They only are used for internal purpose als temporary flags during calculation).

    Some exsamples:
    numberfloating point format (BCD)
    600 00 60 00 00 00 00 00
    6000 10 60 00 00 00 00 00
    0.699 90 60 00 00 00 00 00
    0.0699 80 60 00 00 00 00 00
    -0.699 98 60 00 00 00 00 00
    -600 08 60 00 00 00 00 00
    nibble 0-2 stands for the exponent:
    For positive number: 0 0 0 to 0 9 9 -> number = mantissa*10^0 to 10^99
    For negative number: 9 9 9 to 9 0 1 -> number = mantissa*10^-(1000-999) to 10^-(1000-901) (== 10^-1 to 10^-99)

    nibble 3-15 are the mantissa:
    For positive number: nibble 3 == 0
    For negative numbers: Nibble 3 == 8
    nibble 4-15 is the mantissa (for leading zeros then exponent is used).
    nibble 14-15 only is used internally for rounding purpose but is not displayed.
    (*01a) The sign of FAC 1..4 must not be set in (31) before calling the function.
    Functions marked with (*1a) set (31) internally if needed and also copy it back from (31) to FAC 1..4 after calculation.
    (*01b) The sign for FAC 1..4 must be copyed to (31) and should be deleted in FAC 1..4 before calling the function.
    This can be done by calling 0D64/0D42 (PC-1360) or 0310/0301 (PC-1350)
    (31) indicates the sign of FAC 1..4 after calling the function and should be written to FAC 1..4
    This can be done by calling 0D74/0D69 (PC-1360) or 0333/0328 (PC-1350).

    Functions not marked with (*01b) don't set (31) from FAC 1..4 but rely on it for calculation.
    (*02) If the logical basic memory starts at < &8000 (MEM "B" or MEM "D"):
    • address &0000 to &7FFF:
      • activate RAM bank 0
      • read/write (address + &8000)
      • activate RAM bank 1
    • address &8000 to &FFFF:
      • (address) read/write from/to RAM bank 1

    Sonst (MEM "C"):
    • (address) read/write from/to RAM bank 0
    (*03) PC-1360: 2AB4/B5 , PC-1350: 6F20/21
    S is stored at this address after all parameters of a basic command were analysed.
    The basic interpreter will continue execution at (S+1).

    Example:
    The assembler program expects, separated by a comma, a numeric parameter:
     
    Example PC-1360 (address: 8100)
    100: CALL &8100,G

    LD A,(+S)
    CMP A,2C
    JP Z,+0C ; comma found
    ; Error 1 (no comma found)
    POP A    ; delete return address auf basic command CALL
    POP A
    DEC S    ; set S to the last read char
    JSR 1212 ; 2AB4/B5 = S
    SET C    ; C=1 as flag for an error
    JP,10C0  ; end program with ERROR 1
    JSR,4016 ; FAC1 = argument starting at (S+1), ROM-bank 0 (in the example value of variable G)
    JSR 1212 ; 2AB4/B5 = S
    ....     ; use FAC1
    RET      ; end basic extension (== CALL command)


    Example PC-1350 (address: 6100)
    100: CALL &6100,G

    LD A,(+S)
    CMP A,2C
    JP Z,+0C ; comma found
    ; Error 1 (no comma found)
    POP A    ; delete return address auf basic command CALL
    POP A
    DEC S    ; set S to the last read char
    JSR 1D84 ; 6F20/21 = S
    SET C    ; C=1 as flag for an error
    JP,10EC  ; end program with ERROR 1
    JSR,8039 ; FAC1 = argument starting at (S+1) (in the example value of variable G)
    JSR 1D84 ; 6F20/21 = S
    ....     ; use FAC1
    RET      ; end basic extension (== CALL command)
ROM bank 0
  • Introduction
    These are the procedures from the ROM (bank 0) in the PC-1360
    Afaik the addresses are identicle for ROM version 3 and 5.
    PC-1350: The addresses for ROM version 0 and 1 are different.
     
  • ROM bank 0
    address
    PC-1350
    address
    PC-1360
    description
    8039
    v0 & v1
    4016Read value from S+1, result -> FAC 1
    S points to the next char
    420FNEW
    Can only be executed in "Program Mode"
    8403
    v0 & v1
    46C0PC-1360:
    Return values:
    PC-1360 key-codes

    Table to convert keycode from 1E9C/00B5 to ASCII
    46C0..4707 key without SHIFT and without SML
    4708..474F key with SHIFT and without SML
    4750..4797 key without SHIFT and with SML
    4798..47DF key with SHIFT and with SML

    PC-1350:
    Return values:
    PC-1350 key-codes

    Table to convert keycode from 0436 to ASCII
    8403..8443 key without SHIFT and without SML
    8485..84C5 key with SHIFT and without SML
    8507..8547 key without SHIFT and with SML
    8548..8588 key with SHIFT and with SML
    1A546DEFSearch variable address from (S+1)
    The variable already must be defined!
    Return value:
    06/07adress-1 of the variable
    0A/0Bvariable name

    For standardvariables:
    number:0Aname
    0B00
    (+D)1. byte of the number
    string:0Aname
    0B20
    (+D)F5 (indicator for string)

    Bei normalen Variablen:
    Zahl:0A1.Zeichen
    0B2.Zeichen
    (+D)1. Byte der Zahl
    String:0A1.Zeichen
    0B2.Zeichen+80
    (+D)1.Zeichen des Strings
    Stringsende = 00
    8A85 v0
    8BDB v1
    6A3AFAC 1 = FAC 2 < FAC 1 (*01)(*01a)
    8A34 v0
    8B8A v1
    6A45FAC 1 = STR 2 < STR 1 (*01)
    8AB5 v0
    8C0B v1
    6A4FFAC 1 = FAC 2 > FAC 1 (*01)(*01a)
    8A36 v0
    8B8C v1
    6A58FAC 1 = STR 2 > STR 1 (*01)
    8A1F v0
    8B75 v1
    6A62FAC 1 = FAC 2 <= FAC 1 (*01)(*01a)
    8A18 v0
    8B6E v1
    6A6BFAC 1 = STR 2 <= STR 1 (*01)
    8A2C v0
    8B82 v1
    6A75FAC 1 = FAC 2 >= FAC 1 (*01)(*01a)
    8A1A v0
    8B70 v1
    6A80FAC 1 = STR 2 >= STR 1 (*01)
    8AFB v0
    8C51 v1
    6A8AFAC 1 = FAC 2 == FAC 1 (*01)(*01a)
    8ABD v0
    8C13 v1
    6A98FAC 1 = STR 2 == STR 1 (*01)
    8B0F v0
    8C65 v1
    6AA6FAC 1 = FAC 2 <> FAC 1 (*01)(*01a)
    8B0A v0
    8C60 v1
    6AAFFAC 1 = STR 2 <> STR 1 (*01)
    6E85Search address of a 2 char variable
    Input parameter:
    0A1. character of the variable name
    0B2. character of the variable name

    Return value:
    Daddress
    Alength
ROM bank 1
  • Introduction
    These are the procedures from the ROM (bank 1) in the PC-1360
    Afaik the addresses are identicle for ROM version 3 and 5.
    PC-1350: The addresses for ROM version 0 and 1 are different.
     
  • ROM bank 1
    address
    PC-1350
    address
    PC-1360
    description
    807E
    v0 & v1
    4004Output one line/all lines on the display
    Input parameter:
    PC-1350PC-1360value
    6D00..6D17FD80..FD97text for 1st line
    6D18..6D2FFD9A..FDAFtext for 2nd line
    6D30..6D47FDB0..FDC7text for 3rd line
    6D48..6D5FFDC8..FDDFtext for 4th line
    AA
    0..3output line 1..4
    4output all 4 lines
    DEAD v0
    E23C v1
    4043Scroll display
    Scrolls the display and the displaybuffer (FD80..FDDF) (PC-1350: 6D00..6D5F) one line up
    Input parameter:
    A=4
    808A
    v0 & v1
    418BCharset 5x8
    Character beginning with ASCII 32
    PC-1360: each character is stored in display order (byte 0..4)
    PC-1350: each character is stored in inverse display order (byte 4..0)
    4513Charset 8x16 (upper 8 + lower 8)
    E549 v0
    E983 v1
    615EOutput one character on display
    Input parameter:
    PC-1350PC-1360value
    AAcharacter
    7881FD10cursor X (0..23)
    7880FD11cursor Y (0..3)
ROM bank 2
  • Introduction
    These are the procedures from the ROM (bank 2) in the PC-1360
    Afaik the addresses are identicle for ROM version 3 and 5.
    PC-1350: The addresses for ROM version 0 and 1 are different.
     
  • ROM bank 2
    address
    PC-1350
    address
    PC-1360
    description
    4064NEW (only when "program mode" is active (=420F bank 0)
    40C4variable -> FAC 1 (=4016 bank 0)
    E6B1 v0
    EAEB v1
    5224LINE
    Input parameter:
    PC-1350PC-1360value
    6F63/6430A8/A9start X
    6F65/6630AA/ABstart Y
    6F67/6830AC/ADend X
    6F69/6A30AE/AFend Y
    6F62FD0F
    or 01,S
    or 02,R
    or 04,X
    or 08,B
    or 10,BF
    or 20pattern
    74A0/A1FF10/11pattern
    EB3A v0
    EF84 v1
    5703PSET / PRESET / PSET,X
    Input parameter:
    PC-1350PC-1360value
    20/2120/21X (LO/HI)
    22/2322/23Y (LO/HI)
    6F62FD0F
    00POINT (Z=0 when pixel set)
    01PSET
    02PRESET
    04PSET,X
    EB4E v0
    EF98 v1
    5717PSET / PRESET / PSET,X
    Input parameter:
    PC-1350PC-1360value
    20X with 0 <= X <= 149(decimal)
    22Y with 0 <= Y <= 31(decimal)
    6F62FD0Fsee 5703
    5ECBsearch line number in 18/19
    Input parameter:
    18/19line number (LO/HI)

    Return value:
    result:
    carry=0
    Carry=0line number found
    3A/3Badsresse (LO/HI)
    3C/3Dline number (LO/HI)
    result:
    carry=1
    Carry=1line number not found
    3C/3D=0complete program was searched without success
    3C/3D<>0line number found larger than the line number to find
ROM bank 4
  • Introduction
    These are the procedures from the ROM (bank 4) in the PC-1360
    Afaik the addresses are identicle for ROM version 3 and 5.
    PC-1350: The addresses for ROM version 0 and 1 are different.
     
  • ROM bank 4
    address
    PC-1350
    address
    PC-1360
    description
    99CA v0
    9B5E v1
    5E72CLOAD M at address in 28/29
    Input parameter:
    28/29 = address, where the program is loaded to
    99CD v0
    9B61 v1
    5E75CLOAD M to original address
    Input parameter:
    (31) AND &7F ; bit 7 must be deleted

back to staring page Sharp


Copyright: All images and text shown on this page are ©1999/2026 Bernhard Schwall, copyright protected and meight not be used without permission of the author.
Author:  Bernhard Schwall last change: 01.01.2026