PC 1401 Resources
More info: Simon-Lehmayr.de (english version)
Errors
From the hard cover:
Code
|
Meaning
|
1
|
Syntax error
|
2
|
Calculation error
|
3
|
Illegal function argument (Usually type error)
|
4
|
Too large a line number (Line number is too large / Too many lines in RAM)
|
5
|
NEXT without FOR or RETURN without GOSUB (Stack underflow)
|
6
|
Memory overflow (Usually a stack overflow)
|
7
|
PRINT USING error (I don't know what this one even means)
|
8
|
I/O device error (Usually a communication error)
|
9
|
Other errors
|
Assembly and IO
Mnemonics can be found on the website linked above. I have a few additional remarks:
-
You can use POKE &8800,... to write the program to RAM in a usually-free region.
-
It can be called using CALL &8800
-
Ports on PC-1401 are different in ways I have not yet discovered. The 11-pin IF cannot be controlled using any of the known methods.
-
On the PC-1403, PORT F is very easy to control and will not get reset by the BASIC interpreter.
-
The CSAVE/XOUT pin gets pulled high for a short moment upon RUN.
-
The CPU uses INSTRUCTION,VALUE,... order and is Big-Endian.
-
To write to memory, use LIA,value,LIP,address,EXAM for address < 128 and LIA,value,LIDP,addresshigh,addresslow,STD for larger
addresses
-
RTN will return to the BASIC interpreter as expected.
REM Program to output 1 @ pin 4 on PC-1403
REM LIA,255,LIP,95,EXAM,OUTF,RTN
POKE &8800,2,255,18,94,219,95,55
CALL &8800
END