25

output to the screen.

Other computers, notably the Commodore C-64, require you to open the printer as a numbered device then to direct output to that device. For example, you might type the following to print “Hello!” or to list a program in the C-64’s memory.

OPEN4,4

OPEN4,4

CMD4

CMD4

LIST

PRINT "Hello! 'I

CLOSE 4

CLOSE4

Here, the first line says that the printer is device number 4, the second directs output to it, the third does the printing, and the last line closes down device number 4.

Appendix H gives more information about listing programs on the various computers. Find the part that applies to your com- puter and try it.

Now that we know how to address the printer, let’s try listing a BASIC program. Load a program into memory ready to pro- gram printer operation - just as soon as we learn a little bit about the ASCII codes.

W ASCII codes and the CHR$ function

You talk to your computer in BASIC, but your computer and your printer talk to each other in what are known as ASCII codes. In the ASCII code, each number from 0 to 255 has a par- ticular meaning - 36, for example, makes the printer print a dollar sign. Some numbers cause the printer to do other things, too. For instance, sending a 7 sounds the printer’s bell.

Taken together, these numbers and their meanings make up the ASCII code (pronounced ask-key), which stands for the American Standard Code for Information Interchange. There are ASCII codes for all the letters of the alphabet (upper case and lower case), 0 to 9, most punctuation marks, and some (but not all) of the functions of the printer.

There are a number of different ways to represent an ASCII code, depending on how you are using it. For example, the ASCII codes for the letter “A” are 65 (decimal) or &H41 (hex- adecimal). Or you can just call it “A”. Appendix B shows all of the ASCII codes.

BASIC uses the CHR$ function to represent ASCII characters and many functions. To print the letter “A” we

Page 32
Image 32
Star Micronics NX-10 user manual OPEN4,4 CMD4 List

NX-10 specifications

The Star Micronics NX-10 is a cutting-edge receipt printer designed for modern business environments. Known for its sleek design and outstanding performance, the NX-10 is ideal for retail, hospitality, and other service-oriented industries. One of its standout features is its fast printing speed, capable of producing receipts at an impressive rate of 300 mm per second. This speed ensures that customers do not have to wait long, enhancing service efficiency and customer satisfaction.

One of the key technologies integrated into the NX-10 is its advanced connectivity options. The printer supports multiple interfaces, including USB, Ethernet, and Bluetooth, allowing seamless integration with various devices such as tablets, smartphones, and POS systems. This flexibility is particularly beneficial in mobile and cloud-based applications, enabling businesses to adapt to their operational needs easily.

The NX-10 also features innovative paper-saving capabilities, including an automatic paper cutter that minimizes waste and reduces operation costs. The printer utilizes a high-quality thermal printing mechanism that ensures crisp, clear text and graphics, making it perfect for producing promotional receipts or tickets alongside regular transaction printouts.

Another notable characteristic of the Star Micronics NX-10 is its robust construction, built to withstand the demands of high-volume printing environments. The printer is designed for easy maintenance with a straightforward drop-in paper loading system that reduces downtime and increases productivity.

The intuitive design of the NX-10 includes a user-friendly interface, which makes it easy for staff to operate without extensive training. Built-in LED indicators provide useful information about printer status, ensuring users are informed at all times.

With a compact footprint, the NX-10 can be easily integrated into any workspace without taking up too much counter space. Its diverse compatibility with major operating systems, including Windows, iOS, and Android, further emphasizes its versatility, making it an ideal choice for various business scenarios.

In summary, the Star Micronics NX-10 is a state-of-the-art receipt printer combining speed, connectivity, and durability. Its advanced features and technology make it a valuable asset for businesses looking to enhance their operations and deliver exceptional customer experiences.