Jump to content

Hello world/Line printer: Difference between revisions

Added Commodore BASIC
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(Added Commodore BASIC)
Line 262:
END-DISPLAY.
STOP RUN.</lang>
 
=={{header|Commodore BASIC}}==
Most Commodore printer peripherals operate off the IEC bus commonly as device 4 or 5. It is also possible that some printers may be connected through the RS-232 serial port (typically device 2). This example assumes a device on the IEC bus with a default setting of device 4. This example does not utilize any printer control codes to change font, pitch, quality, graphics, etc., as those can vary between brands and models of printer.
 
<lang CommodoreBASICv2>
10 rem rosetta code - "Hello World" on line printer
20 open 7,4 : rem open <logical file number>, <device number>
30 print#7,"hello world!" : rem print line as shown to logical file number
40 close 7 : rem close the file number
</lang>
 
 
=={{header|Common Lisp}}==
Line 270 ⟶ 281:
:if-exists :append)
(format stream "Hello World~%")))
 
(main)
</lang>
113

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.