Special Features

65

Let’s analyze the program. Line 10 sets the line spacing to 7/72 of an inch so that the characters that we print will touch top to bot- tom. Lines 20-40 print 10 vertical line characters. Then line 60 sets one-direction printing and the vertical lines are printed again. Finally line 100 sends a form feed to advance the paper to the top of a new page, and then uses the master reset to restore Delta to the power-on condition.

Backspace and delete

Backspace (CHR$(8)) “backs up” the printhead so that you can print two characters right on top of each other. Each time Delta receives a backspace it moves the printhead one character to the left, instead of to the right. You can strike over multiple letters by sending more than one backspace code.

Delete (CHR$(127)) also “backs up” one character, but then it “erases” the previous character (it’s erased from Delta’s buffer, not from the paper).

The following program shows how these two codes work.

NEW

10 LPRINT "BACKSPACEDOES NOT";

20LPRINTCHR$(8)CHR$(8)CHR$(8);

30LPRINT 'I===WORK"

40LPRINT "DELETEDOES NOT";

50LPRINTCHR$(127)CHR$(127) CHR$(127);

60LPRINT "WORK"

Here is what this program will print:

EAC;t:::SF’ACE DOES WOV WORC:;

DELETE DOES WOKC,

The backspace codes in line 20 move the printhead a total of three spaces to the left so that the first part of line 30 will overprint the word “NOT”. The delete codes in line 50 “erase” the three letters in the word “NOT” so that it doesn’t even print.

The seven bit dilemma

Certain computers (most notably the Apple II) don’t have the capability to send eight bits on their parallel interface. They can only send seven bits. This would make it impossible for these

Page 77
Image 77
Star Micronics Delta NEW Lprint Backspacedoes not, Lprint I===WORK Lprint Deletedoes not, Lprint Work, Seven bit dilemma