📄 printerdemo.asm
字号:
; PrinterDemo.asm - Andrew Nelis 2003
;
; Simple demonstration of the printer.
;
; it is required to start "Printer.exe"
; before running this demonstration
; (select it from "Virtual Devices" menu
; of the emulator).
#make_COM#
; COM file is loaded at CS:0100h
ORG 100h
lea bx, message
mov cx, 27d ; Length of message
mov ax, 0h ; Ensure top and bottom of
; ax empty
spit:
mov al, [bx] ; Put char into al
out 130d, al ; push char out port
; (ie. into printer)
inc bx ; inc pointer
wait: ; Loop to ensure the printer
in al, 130d ; is ready, it clears
or al, 0 ; the port when this is true.
jnz wait
loop spit ; Go back and repeat if we're
; not finished
ret
message db "Hello World!", 10, 13, "------------", 07
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -