TITLE 'Abort Printer GIOS Output' ;----------------------------------------------------------------------+ ; Revision : Dec. 14, 1983 + ; File Name : Chkabort.a86 Version 1.0 + ; The User may halt the printer output by pressing any console key. + ; This module display the message: STOP PRINTER OUTPUT (Y/N) ? + ; If user enter Y, printer gios stops processing, cleans up + ; bit map buffer, clears object list and returns control to the + ; application. Typing N causes the GIOS to resume output. + ;----------------------------------------------------------------------+ DGROUP GROUP DATA dseg Public Abort_Flg stop_message db ' STOP PRINTER OUTPUT (Y/N) ?','$' crlf db 0ah,0dh,'$' Abort_Flg db 0 bchar rs 01 cseg PUBLIC check_ABORT Check_Abort: Push Es Push Ax Push Bx Push Cx Push Dx Mov Byte Ptr Abort_flg, 0 Mov Cl, 0bh ; Check console status Int 224 Cmp al,0 Jne Get_key Jmp Resume ; No Console Input Present Get_key: Mov Cl, 01 ; Get Console Key Pressed Int 224 Try_asking: Mov Cl, 09h ; Output STOP ? Message on Console Mov Dx, Offset stop_message Int 224 Mov Cl, 01 ; Get Console Reply Int 224 Mov Byte Ptr Bchar, Al Mov Cl, 09h Mov Dx, Offset crlf Int 224 Mov Al, Byte Ptr Bchar Cmp al, 59h ; Y ? Je Abort_cp_now Cmp Al, 79h ; y ? Je Abort_cp_now Cmp Al, 4eH ; N ? Jne lowern Jmp Resume lowern: Cmp Al, 6eH ; n ? Jne Try_asking Jmp Resume Abort_cp_now: ; Set the Abort processing flag, the Printer Gios Output ; Module will check the abort flag ; Output will be stopped if this flag is set to ffH Mov Byte Ptr Abort_flg, 0ffH ;;;; Call Abort ; Do Something ? Resume: Pop Dx Pop Cx Pop Bx Pop Ax Pop Es Ret End