16.10.2013 Views

5 - Forth Interest Group

5 - Forth Interest Group

5 - Forth Interest Group

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

pigum Eleoen, continued.)<br />

METHOD: W-GOTOXY ( x y addr -- )<br />

\ Cursor addressing within the window<br />

UPPERLEFT IN RECT D+ GOTOXY<br />

METHOD ;<br />

METHOD: W-HOME ( addr -- )<br />

\ Move cursor to the window home position, upper left<br />

UPPERLEFT IN RECT GOTOXY<br />

METHOD;<br />

METHOD: W-LLC ( addr -- )<br />

\ Move the cursor to the lower left corner of window<br />

WSIZE + DUP @ SWAP WSIZE + @ GOTOXY<br />

METHOD:<br />

METHOD: W-BORDER ( addr -- )<br />

\ Draw a border around the window using IBM character set<br />

DUP >R UPPERLEFT IN RECT R> LOWERRIGHT IN RECT<br />

\ The window parameters are now on the stack<br />

OVER 1+ 4 PICK<br />

DO \ Do two sides<br />

I 3 PICK 1- GOTOXY OC4 EMIT<br />

I OVER 1+ GOTOXY OC4 EMIT<br />

LOOP<br />

DUP 1+ 3 PICK<br />

DO \ Do the other sides<br />

OVER 1+ I GOTOXY OB3 EMIT<br />

3 PICK 1- I GOTOXY OB3 EMIT<br />

LOOP<br />

OVER 1+ 3 PICK 1- GOTOXY OBF<br />

3 PICK 1- OVER 1+ GOTOXY OCO<br />

1+ SWAP 1+ SWAP GOTOXY<br />

1- SWAP 1- SWAP GOTOXY<br />

METHOD ;<br />

DECIMAL<br />

community for whom re-<br />

usability of code is not<br />

important.. .." "<strong>Forth</strong> has<br />

acquired an unfortunate<br />

reputation as being highly<br />

non-portable, and GB's<br />

comments serve to rein-<br />

force this impression."<br />

". . .throw away time and<br />

effort needed just for a<br />

marginal gain in execu-<br />

tion speed.. .."His [GB'sl<br />

work does not require<br />

portability.. ." "No stan-<br />

dardis needed<br />

who plan to ignore it any-<br />

how ..." "... ER and GB's<br />

responses add unfortu-<br />

nate confimation to the<br />

suspicion that the MI<br />

team is writing a new<br />

'Ian<br />

to pas Off as "*'"<br />

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

ANSI team is dominated<br />

by people who do not<br />

place much value on<br />

portability-and Greg<br />

Bailey says as much."<br />

These and many similar<br />

passages from recent<br />

postings of John's serve to<br />

create, by repetition, the er-<br />

roneous impression that<br />

members of the TC, includ-<br />

ing myself, have little or no<br />

interest in portability or reus-<br />

ability of code and are doing<br />

grievous harm to what John<br />

sees as <strong>Forth</strong>. In fact, this is<br />

an erroneous interpretation<br />

of at least my position, and I<br />

Pmume that the '00' of the<br />

problem is that at least until<br />

the semantic issue I men-<br />

tioned on 16 August is dari-<br />

fed, John will continue to<br />

EMIT ( urc)<br />

EMIT ( llc )<br />

OD9 EMIT ( lrc )<br />

ODA EMIT ( ulc )<br />

misunderstand the motives<br />

and actions of the TC.<br />

Simply stated, again, my<br />

understanding of John<br />

Wavrik's position is that to<br />

him <strong>Forth</strong> means (and I pre-<br />

sume he believes it was in-<br />

tended to mean) a static,<br />

open implementation model.<br />

For example, he considers<br />

that <strong>Forth</strong> includes a word<br />

spelled DOCOL that, when<br />

executed, returns a value that<br />

can be passed to , (comma)<br />

with specific and well-de-<br />

fined meaning having to do<br />

with the creation of a body of<br />

executable code. He also<br />

believes that <strong>Forth</strong> includes<br />

words spelled ?BRANCH and<br />

OBRANCH that are, and I<br />

gather must be, used in<br />

implementing control-flow<br />

words. He feels likewise<br />

about the existence, and<br />

likewise about a method of<br />

implementation that should<br />

be guaranteed to work, for<br />

LIT. John, am I misstating<br />

your position here at all? I<br />

don't think I misunderstand<br />

you. What I have heard you<br />

say befo~ is that you don't<br />

really care what it is, but<br />

whatever it turns out to be<br />

you want it all (i.e., you<br />

really strongly desire a standard<br />

that prescribes an<br />

implementation-whether<br />

you draw the "architectural"<br />

boundary there or not-at<br />

least completely enough that<br />

you know and can manipulate<br />

the executable text of a<br />

colon definition; that you<br />

krww and can manipulate<br />

the structure of the dictionary;<br />

and so on). My understanding<br />

of your position is<br />

that a laudable standard could<br />

be formed by taking virtually<br />

anygood implementation of<br />

<strong>Forth</strong>, documenting the<br />

whole thing, and saying that<br />

standard <strong>Forth</strong> must be<br />

implemented in this way on<br />

all computers.<br />

Before I reply in detail to<br />

your postings, I think it would<br />

be useful to refine with you<br />

the above paragraph as<br />

needed, so that what we<br />

have is a concise but accurate<br />

statement of where you<br />

draw the line.<br />

At the same time, so that<br />

we can all calibrate your sensitivity<br />

to the performance<br />

one may expect of an application<br />

written in <strong>Forth</strong>, I<br />

would like to know what<br />

you mean by "marginal gains<br />

in speed." For example, is a<br />

lox performance improvement<br />

on a given CPU marginal<br />

to you? Readers of these<br />

postings might erroneously<br />

conceive, for example, that<br />

the architecture-independent<br />

definition of <strong>Forth</strong> we have<br />

tried to write in the dpANS<br />

was undertaken for no other<br />

reason than to permit implementations<br />

that shave a few<br />

percent off execution speed.<br />

Nothing could be farther from<br />

the truth.<br />

I<br />

January 1992 February

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

Saved successfully!

Ooh no, something went wrong!