text stringlengths 0 99.6k |
|---|
Macintosh Communications Forum (GO CIS:MACCOMM) |
Library 4 (Comm Progs/Utils) |
File: EXTRAC.BIN (freeware) (30720 bytes) |
NeXT Machines |
------------- |
ZIP Format NeXT Users Forum (GO CIS:NEXTFORUM) |
Library 5 (Applications) |
File: OPENER.TAZ (245257 bytes) |
ZOO Format NeXT Users Forum (GO CIS:NEXTFORUM) |
Library 5 (Applications) |
File: OPENER.TAZ (245257 bytes) |
ARC Format NeXT Users Forum (GO CIS:NEXTFORUM) |
Library 5 (Applications) |
File: OPENER.TAZ (245257 bytes) |
SIT Format NeXT Users Forum (GO CIS:NEXTFORUM) |
Library 5 (Applications) |
File: OPENER.TAZ (245257 bytes) |
LZH Format NeXT Users Forum (GO CIS:NEXTFORUM) |
Library 5 (Applications) |
File: OPENER.TAZ (245257 bytes) |
Unix Machines |
------------- |
ZIP Format Unix Forum (GO CIS:UNIXFORUM) |
Library 3 (Tools) |
File: UNZIP4.TAZ (116577 bytes) |
Unix Forum (GO CIS:UNIXFORUM) |
Library 3 (Tools) |
File: ZIP10E.TAZ (186592 bytes) |
ZOO Format Unix Forum (GO CIS:UNIXFORUM) |
Library 3 (Tools) |
File: ZOO.TAZ (322932 bytes) |
ARC Format Unix Forum (GO CIS:UNIXFORUM) |
Library 3 (Tools) |
Files: ARCSRC.TAZ (163193 bytes) |
SIT Format Unix Forum (GO CIS:UNIXFORUM) |
Library 3 (Tools) |
File: UNSIT1.SHZ (18938 bytes) |
MACHINE CODE PROGRAMMING EXAMPLE page 1 |
Have you ever looked at a doc file and discovered it was an ASCII file |
instead of PETASCII. "NEW UTILITY" has a word-processor in it that |
would convert it to a PETASCII, but some files are too long to fit, so |
here is a program to convert them. |
First, here is what the program had to do: |
(1) Discard any linefeeds. This is a hex $0a or a decimal 10 |
code. |
(2) Convert any values beginning at $41 (decimal 65) and ending |
with $5a (decimal 90) to corresponding values in the range $c1 to |
$da. This simply involved setting the high bit of the orginal |
value. These values represent uppercase characters. |
(3) Convert values in the $61 to $7a range to the corresponding |
values in the $41 to $5a range. This is accomplished by |
subtracting $20 from the orginal value.These values represent the |
lower case letters. |
To accomplish these objectives, the program combines a combination of |
BASIC and machine language. BASIC is used to open the file and check |
for disk errors and machine language to do the converting and write it |
back to disk. The file is converted as it is read rather than have 2 |
files open to the disk (it can be done if you want) The converted file |
is stored in a buffer beginning at $2000 (decimal 8192). When the |
initial file has been converted, the program returns to BASIC to check |
for disk errors, close the file, open the write file, check for a good |
open, and then sys back to the machine language routine to write the |
file to disk. A sequential file can never contain a hex $00, so that |
is used to mark the end of the file in the buffer. When that marker is |
reached, the program returns to BASIC to check for errors and close the |
file. It's all straigt-forward and a beginner may be able to follow |
the program well enough to get some understanding of machine language |
programming. |
Beginning at line 10, here is an explanation of the listing: |
Line 10 thru 13 initializes a pointer located in zero page to the |
address for the beginning of the buffer. |
Line 14 and 15 set up file #8 as our input file. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.