Okay. I looked into it a little more and I found out that PCopen() (and other similar commands) are for MESS which are for the DTL boards, even though the CAETLA document states it works.
Looking even more, I found this line of code from an example.
LoadGraphicToVRAM("pcdrv:images\\logo.tim", &TimImage);
It compiles perfectly fine. Though if I run
PSEXE.COM -P10 -L MAIN.EXE, I get "PC control is not possible" from it.
If I try without the -L switch, logo.tim doesn't load at all. I am using CAETLA V0.34 for all of these tests.
CATFLAP.EXE doesn't work correctly either (
CATFLAP.EXE -XP -P0x378 RUN MAIN.EXE). It just comes back once uploaded with 'Error: Communications Timeout'.
The CAETLA documenatation states that:
Code: Select all
--------------------------------------------------------------------------
PC file server
--------------------------------------------------------------------------
CAETLA supports pcdrv: device, the SN systems device extension to access
files on the drive of the pc. This fileserver can be accessed by using the
kernel functions, with the 'pcdrv:' device name prefix to the filenames or
using the SN system calls.
-------------------------------------------------------------
SN System calls
-------------------------------------------------------------
The following SN system calls for the fileserver are provided.
Accessed by setting the registers and using the break command
with the specified field.
-------------------------------------------------------------
PCInit Inits the fileserver.
break $0101
-------------------------------------------------------------
PCCreat Creates a new file on PC.
break $0102
in: a1 pointer to file name
a2 file attribute
out: v0 0 = success, -1 = failure
v1 file handle or error code if v0 is negative
-------------------------------------------------------------
PCOpen Opens a file on the PC.
break $0103
in: a1 pointer to file name
a2 access mode 0 read only
1 write only
2 r/w
out: v0 0 = succes, -1 = failure
v1 file handle or error code if v0 is negative
-------------------------------------------------------------
PCClose Closes a file on the PC.
break $0104
in: a1 file handle
out: v0 0 = succes, -1 = failure
v1 0 = succes, error code if v0 is negative
-------------------------------------------------------------
PCRead Reads from an open file on PC.
break $0105
in: a1 file handle
a2 length in bytes
a3 pointer to store address
out: v0 0 = succes, -1 = failure
v1 number of read bytes or error code if v0 is
negative.
Note: Does not stop at eof, so if you set more bytes to read
than the filelength, the fileserver will pad with zero
bytes. If you are not sure of the the filelength obtain
the filelength by PClSeek (a2 = 0, a3 = 2, v1 will return
the length of the file, don't forget to reset the file
pointer to the start before calling PCread!)
-------------------------------------------------------------
PCWrite Writes to an open file on PC.
break $0106
in: a1 file handle
a2 length in bytes
a3 pointer to read address
out: v0 0 = succes, -1 = failure
v1 number of written bytes or error code if v0
is negative.
-------------------------------------------------------------
PClSeek Repositions the file pointer
break $0107
in: a1 file handle
a2 number of bytes to move.
a3 position from 0 Beginning of file
1 Current pointer
2 End of file
out: v0 0 = succes, -1 = failure
v1 file pointer
-------------------------------------------------------------
Attributes are passed as is. File attributes for the pc file
system are like this:
bit | 7 6| 5| 4| 3| 2| 1| 0|
desc| 0| A| D| 0| S| H| R|
A Archive file
D Directory
S System file
H Hidden file
R Read only file
-------------------------------------------------------------
If anyone has any ideas or can shed some light on the subject, that would be great
