[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Hard-coding" a text file



Let me see if I can explain the code.

With the cursor on an AppleWorks word processor line, the pointer to the
pointer of that particular line is at $B0, a zero page address. You get the
pointer, and use it to pull the entire line, including the all the text and the
length information, into main memory at a free area at $800. (Getblock)

The second byte of the line, $801, is the length byte ($800 is some
miscellaneous stuff we don't care about). AppleWorks standard says if the high
bit is set, there is a carriage return in the line. If the high bit is clear,
there is no carriage return. We set the high bit of each line. We poke it into
the length byte at $801.

Then we move the block (the entire line at $800) back out in memory with
Putblock. The line now has a carriage return and it is permanent in the file.

Then we do a few other things, and move on to the next line until the end of
the file is reached. That L(9)=L: is extraneous and doesn't belong in this code
excerpt.

That's about the most advanced macro programming there is. Most of UltraMacros
is much easier and friendlier than that. I hope it works for you.

Beverly Cadieux 
The Apple II Mail Group - http://members.aol.com/A2MG