Newer
Older
Microsoft / ff / FF.ASM
@tundra tundra on 24 May 2012 1 KB Initial revision

		PAGE 66,132
		TITLE FF.ASM
;
;
; **********
; * FF - Automatic Printer FormFeed - Version 1.0.0
; * Copyright (c) 1984 by T.A. Daneliuk
; * Last Modified: 07/06/84
; **********
;
;
; **********
; * SYSTEM EQUATES
; **********
;
;
FORMFEED	EQU		0CH		; Formfeed character
SVC		EQU		21H		; DOS System Entry
PRINT_STRING	EQU		09H		; Print string call
PRINTER		EQU		05H		; Print character on printer
EXIT		EQU		00H		; DOS Exit Vector
EOL		EQU		0A0DH		; End of Line
;
;
; **********
; * STACK SEGMENT
; **********
;
;
STACK		SEGMENT	PARA STACK 'STACK'
;
;
		DB		10 DUP('STACK ')
;
;
STACK		ENDS
;
;
; **********
; * SEGMENT CONTAINING SIGNON MESSAGE
; **********
;
;
LOGON_MSG	SEGMENT WORD 'DATA'
;
;
MSG1		DB		'Printer FormFeed - Version 1.0.0'
		DW		EOL
		DB		'Copyright (c) 1984, T.A. Daneliuk'
		DW		EOL
		DB		'$'
;
;
LOGON_MSG	ENDS
;
;
; **********
; * SEGMENT CONTAINING ACTUAL RUNTIME CODE
; **********
;
;
RUNTIME		SEGMENT WORD 'CODE'
;
;
		ASSUME		CS:RUNTIME,DS:LOGON_MSG,SS:STACK
;
;
START		PROC		FAR
;
;
; First setup the return on the stack
;
;
		PUSH		DS			; Save for return
		XOR		AX,AX
		PUSH		AX
;
;
; Now point DS to the message field
;
;
		MOV		AX,LOGON_MSG
		MOV		DS,AX
;
;
; Now display the message
;
;
		MOV		DX,OFFSET MSG1
		MOV		AH,PRINT_STRING
		INT		SVC
;
;
; Now send the FormFeed to the printer
;
;
		MOV		DL,FORMFEED		; Character to send printer
		MOV		AH,PRINTER
		INT		SVC
;
;
; Time to go back to the DOS
;
;
		RET
;
;
START		ENDP
;
;
RUNTIME		ENDS
		END		START