text stringlengths 0 99.6k |
|---|
character c in the string s. If the |
character is not in the string a null |
pointer (0) is returned. |
-------------------------------------- |
sys - call machine language subroutine |
sys(address, aptr, xptr, yptr) |
unsigned address; |
char *aptr,*xptr,*yptr; |
(for Commodore 128) |
sys(bank, address, aptr, xptr, yptr) |
int bank; |
unsigned address; |
char *aptr,*xptr,*yptr; |
Sys loads the accumulator, x, and y |
registers of the 6510 processor with |
the values pointed to by a, x, and y |
respectively then jumps to the |
subroutine located at the specified |
address. Upon completion of the |
subroutine the (possibly) new values |
contained in the registers are stored |
indirectly through the pointer |
arguments. Sys returns zero if the |
carry flag is clear after the |
subroutine call, otherwise it returns |
one. This function allows the |
programmer to combine assembler and C |
code in one program without having to |
use a special assembler. Another use |
of sys is to access kernal routines |
not otherwise supported by the |
standard library. |
(for Commodore 128) |
The "bank" in which the machine code |
resides must be specified by a number |
from 0 to 15 (See BASIC "BANK" |
command). |
-------------------------------------- |
C128 to CP/M Memory Transfer Technique |
The following technique has been mentioned in several messages on the TPUG and |
Commodore sigs in the past month, but I am certain that many members may have |
missed it. Therefore I am uploading these instructions so that all may have |
access to this relatively simple and fast technique for transfering binary CP/M |
files to your CP/M disks. |
I must appologize for not giving proper credit to the individual who first |
posted this techniques in the SIGS, but the name escapes me at this time. |
Please note that this technique should NOT be used to transfer ASCII text type |
files from C64 or C128 downloads. The reason is that these types of files have |
the linefeeds stripped off when downloaded in this environment. Linefeeds are |
required by CP/M and thus any files transferred in this manner which are not |
binary type formats will not be usable with this method. CPM271.IMG in this |
sig may be used to transfer this type of file to your CP/M disks. |
Steps to follow to transfer binary CP/M files to CP/M disk: |
1. If the file is greater than 50K or so, forget it, you don't have enough |
memory for this te nique. Use CPM271.IMG instead. |
2. Download the file to your C64/C128 disk as a prg file. |
3. In C128 mode, issue the following command: |
bload"filename",b1,p7170 |
This loads all of the file into bank 1 of memory EXCEPT the first two bytes |
since BLOAD treats them as a load address (prg file). |
4. Get the first two bytes of the file by running the following short basic |
program: |
10 open2,8,2,"filename,p,r" |
20 get#2,a$:ifa$=""thena$=chr$(0) |
30 bank1:poke 7168,asc(a$) |
40 et#2,a$:ifa$=""thena$=chr$(0) |
50 bank1:poke 7169,asc(a$) |
60 close2 |
5. Enter the monitor with the 'monitor' command. |
6. Use m 11c00 to begin looking for the eof address for the file. You can |
a lot of time here by estimating where it is (number of blocks on disk |
times 256 bytes). Otherwise, keep using the 'm' command until you have |
the eof address (in hex). Be sure to look at bank 1 only! |
7. Use x command to exit the monitor. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.