23.10.2013 Views

FAST Forth Native-Language Embedded Computers

FAST Forth Native-Language Embedded Computers

FAST Forth Native-Language Embedded Computers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13<br />

0 \ Lahe1 Raker<br />

1<br />

2 : LZIR ( addrblk -<br />

3 LZIPl LZIPl ; \ Double print zipbar<br />

4<br />

5 : WZIP ( addr-blk - )<br />

6 BLPIt'11PSPREIS~ LZIR;<br />

7<br />

8 \ Note: Set column (SETOIL) to n= 1. -3 before printing labels.<br />

9<br />

16 : RLBL ( - 1 \ Return address label<br />

11 RETRDDR SETLRBEL (ADDR) VTRB PCRNCEL ;<br />

12<br />

13 : RLBL ( addr-blk - \ Nailing address label<br />

14 MIZIP SETLRBEL (RDDR) VTAB WCEL ;<br />

15<br />

14<br />

B \ FIG FDIM Rddress<br />

1<br />

2 : FI6 ( - n... 1<br />

2 ,I <strong>Forth</strong> Interest Group"<br />

4 " P.D. Box 2154"<br />

5 " Oakland, W"<br />

6 "94621-2154"4;<br />

7<br />

8: FD119 ( .. n...<br />

9 " Marlin Duverson, Editor''<br />

10 FIG l+ ;<br />

l!<br />

FORTH and Classic<br />

Compuf er Support<br />

that second view On a~~lica-<br />

tions, check out The Computer Journal. Ifyou run<br />

an obsolete computer (non-clone or PCIXT clone)<br />

and are interested in finding support, then look no<br />

hrther than TCJ We have hardware and software<br />

projects, plus support for Kaypros, S100, CP/M,<br />

6809's, PC/XT1s, and embedded systems.<br />

Eight bit systems have been our mainstay<br />

for TEN years and FORTH is spoken here. We<br />

provide printed listings and projects that can run on<br />

any system We provide old fashioned support for<br />

older systems. All this for just $24 a year! Get a<br />

FREE sample issue by calling:<br />

(800) 424-8825<br />

TC Jw<br />

Lincoln, CA 95648<br />

<strong>Forth</strong> Dimensions<br />

(Readability, continued from page 26.)<br />

program code are verysignificant, and the ascenders and<br />

descenders of lower-case letters make for jagged lines that<br />

blur those boundaries.<br />

Sometimes we have to use many abbreviations and<br />

acronyms to get a substantial comment to fit on a line,<br />

since if the comment does not say enough, it may be as<br />

nebulous as the code. Abbreviations and acronyms don't<br />

go over as well in lower-case, since we tend to try to<br />

pronounce them as written instead of recognizing their<br />

meaning. Even when there is plenty of room, I usually use<br />

the same abbreviations and acronyms, just to be consis-<br />

tent. However, in cases where you can forego these<br />

condensations, using lower-case for the comments can<br />

help the eye separate them from the code.<br />

Remember that consistency also contributes to "pretty<br />

code" and helps readability. The numbers 0-9 are always<br />

"capitalsn-why mix them with lower-case a-f in hex<br />

nUmBErS? Many systems will not even recognize lower-<br />

case letters as numbers, so using upper-case will improve<br />

portability, too.<br />

Conclusions<br />

<strong>Forth</strong> gives an incredible measure of freedom to the<br />

programmer. Since one of the implications is that code<br />

does not have to be readable to run, this flexibility is<br />

sometimes wrongly interpreted as a weakness. In an effort<br />

to make code more maintainable, some companies have<br />

set style standards that their programmers must meet.<br />

These bring up the bottom end, but also have the<br />

undesirable side effect of preventing use of some of the<br />

best strategies.<br />

Producing neat, attractive, readable code ("pretty code")<br />

is not an objective procedure with an exact formula. There<br />

is an art to it. In a way, it's like penmanship; I don't expect<br />

eve~one's to look just like mine, but if a person's writing<br />

is illegible, that is definitely a problem. The continual aim<br />

to achieve greater degrees of readability should be part of<br />

our <strong>Forth</strong> way of life. I hope this article has helped and<br />

encouraged in that direction.<br />

Laboratory Microsystems, Inc. ..... 16<br />

Miller Microcomputer<br />

Services ......................................... .5<br />

Silicon Composers ......................... 2<br />

L<br />

3 1 March 1994 April

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!