The Quebec Link

See all articles from Sinc-Link v8 n5
Author(s): Real Gagnon
Publication: Sinc-Link
Pub Details: Sinc-Link v8 n5 (Volume 8, Issue 5)
Date: September/October 1990
Pages: 20

Réal Gagnon
8286 St-Hubert
Montréal (Qué)
CANADA H2P 1Z3

TS 2068

OK this is a QL column but I just can’t resist to talk about this because deep inside my heart I’m still a 2068’s addict…

In past issues of SINC-LINK there was a discussion about the use of the DEF FN function in 2068 BASIC. I don’t use the 2068 a lot these days but I remember one function that I have developped during my 2068’s period.

It’s not possible to underline text in BASIC without a redefinition of the complete character set or the graphic command DRAW, both are difficult to use. But with my DEF FN, this task is now done with ease.

First we need to define 2 strings, U$ and S$. The first one will contain 32 characters “_” and the other 32 * CHR$ 8, which is the control code for CURSOR LEFT. The DEF FN will use S$ to move to the beginning of the string to be underlined with U$. The function uses also the control code CHR$ 21 to enable the OVER effect to print the U$ without erasing the original string. Let’s go with an example.

10 LET u$="": FOR i=0 to 31:
LET u$=u$+"_": NEXT i
20 LET s$="": FOR i=0 to 31:
LET s$=s$+CHR$ 8: NEXT i
30 DEF FN x$(a$)= a$+s$(TO LEN a$)+
CHR$ 21 + CHR$ 1 +u$(TO LEN a$)

40 LET t$="THIS A TEST"
50 PRINT FN x$(t$)

From this example, we can add a few lines to make the underlining flash.

50 PRINT AT 0,10;FN x$(t$)
60 PAUSE 30
70 PRINT AT 0,10;t$
80 GO TO 50

QL PUBLIC DOMAIN & SHAREWARE

A few months ago, I start a small business, called HIC LOGIQUE, distributing IBM public domain software and shareware. Why don’t do the same thing for the QL!?! So if you are interested to receive my QL catalog, send a stamp (.39) to:

HIC LOGIQUE, P.O. Box 1393, Place du Parc, Montréal (Qué), CANADA H2W 2R4.

I distribute the software on diskette only (5.25″ or 3.5″), I cannot use microdrive, sorry…

CLIVE STRIKES BACK

According to PC Magazine (august ’90), Clive Sinclair is about to release a new portable computer, MS DOS compatible and weighing less than 3 pounds. It is also written that our Uncle Clive is busy designing a variable speed microprocessor, a 90-bit CPU (or something huge like that!)! Funny because when a journalist asked one year ago why he was using a 8-bit CPU in his new Z88 he replied: “Because I couldn’t find a 4-bit chip to I liked.”

Speaking of the Z88, my boss gave me one as a Christmas gift last year, he ordered it directly to Cambridge Computer in US. With shipping, duty and exchange this little black thing cost him almost 1000$ can.! A few months later, he went bankrupt and I lost my job…

QL PROGRAMMING TIP

When we read DATA values, we can test the last value with the EOF function. We don’t need to know how many values we have like other BASIC (e.g. 2068)

ex. 10 REPeat loop
20 IF EOF : PRINT \"Done": EXIT loop
30 READ a : PRINT a
40 END REPeat loop
50 DATA 1,2,3,4,5,6,7,8,9,0

note: I received a note from George Chambers saying that “on the 2068 we can test the last variable by putting an additional number in the DATA statement, making it an unusual number (say 280), then using a line READ A: IF A=280 THEN STOP. If the DATA consists of strings variables then the last element could be “STOP”,and the line would be : READ A$: IF A$=”STOP” THEN STOP.”

TETRIS for the QL

A QL version of the popular arcade game TETRIS is now available. Written in C, it offers many levels and is very addictive. The author can supply the game on 5.25″ diskette for a fee of 10$. If you want the game on a microdrive, you will have to supply one.

Write to: Francois Lanciault
11 Place Marcel Dubé
Blainville (Québec)
J7C 4W4 tel.(514)433-9250

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.