A-83
Appendix A
Command Examples
Code Examples
Below are examples of code written in BASIC showing how
many of the LabelWriter commands are used.
HT Horizontal Tab Example
OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1
PRINT #1, CHR$(27); "*";
PRINT #1, “Total”; CHR$(9); “1.99”;CHR$(10);
PRINT #1, CHR$(12);
Example 1: HT Horizontal Tab
LF Line Feed Example
OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1
PRINT #1, CHR$(27); "*";
PRINT #1, “Line 1”; CHR$(10);
PRINT #1, CHR$(10); CHR$(10);
PRINT #1, “Line 4”; CHR$(10);
PRINT #1, CHR$(12);
Example 2: LF Line Feed
FF Form Feed Example
OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1
PRINT #1, CHR$(27); "*";
PRINT #1, CHR$(29); “L”; CHR$(1); CHR$(150);
PRINT #1, “Feed Length = 2 inches”; CHR$(10);
PRINT #1, CHR$(12);
Example 3: FF Form Feed
CR Carriage Return Example
OPEN "COM1:9600,N,8,1" FOR OUTPUT AS #1
PRINT #1, CHR$(27); "*";
PRINT #1, "Line of Text"; CHR$(13);
PRINT #1, CHR$(12);
Example 4: CR Carriage Return