⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 display.asm

📁 还是一个词法分析程序
💻 ASM
字号:
page 75,132
%Title "Display routines"
;Copyright (c) 1991 By Borland International, Inc.

ifndef MDL
    display "Error: This module requires that you provide a memory model"
    display "    definition on the command line. I.E. /dMDL=SMALL."

MDL equ <SMALL>
endif

% .model MDL,pascal
.code


include display.inc

page
;****************************************************************
; Screen Utilities

; Show value in DL as a hex digit
showhexdigit proc near
         add  dl,'0'
         cmp  dl,'9'
         jbe  showhexdigit_showit
         add  dl,'A'-'0'-10   ; Convert to A,B,C,D,E,F
showhexdigit_showit:
         mov  ah,DOSPRINTCHAR
         int  DOSINT
         ret
showhexdigit endp


; Show value in BH as a hexidecimal byte
ShowHexByte proc
         mov  dl,bh
         shr  dl,1
         shr  dl,1
         shr  dl,1
         shr  dl,1
         call showhexdigit
         mov  dl,bh
         and  dl,0fh
         call showhexdigit
         ret
ShowHexByte endp



; Show value in AX as a hexadecimal word
ShowHexWord proc
         mov  bx,ax
         call ShowHexByte
         mov  bh,bl
         call ShowHexByte
         ret
ShowHexWord endp



Show_Bracket proc
         mov  ah,DOSPRINTCHAR
         mov  dl,'['
         int  DOSINT
         ret
Show_Bracket endp



Show_Endbracket proc
         mov  ah,DOSPRINTCHAR
         mov  dl,']'
         int  DOSINT
         ret
Show_Endbracket endp



CRLF     proc
         mov  ah,DOSPRINTCHAR
         mov  dl,CR
         int  DOSINT
         mov  dl,LF
         int  DOSINT
         ret
CRLF     endp

end


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -