当前位置:网站首页>Assembly | screen display numbers
Assembly | screen display numbers
2022-07-24 08:06:00 【-Babbler-】
function :PRINT Subroutines are displayed on the screen AL The contents of the register ,0-9 Then... Is displayed on the screen 0-9, Greater than 9 Display English letters on the screen .
DATA SEGMENT
TABLE DB 1,2,8,9, 10,11,34,35, 36,37,40,41, 42,43,66,67
;1-9 Show 1-9
;10-35 Show A-Z
;36-41 Show other characters
;42-67 Show a-z
NUM EQU ($-TABLE)
DATA ENDS
CODE SEGMENT
ASSUME: CS:CODE, DS:DATA
START:MOV AX,DATA
MOV DS,AX
MOV CX,NUM ;CX preservation TABLE The number of numbers in the book , Used for circular judgment
LEA SI,TABLE ; Address of a pointer SI Point to TABLE First address of storage area
L: MOV AL,[SI]
CALL PRINT
INC SI
LOOP L
MOV AH, 4CH
INT 21H
; Display subroutine
PRINT PROC NEAR
PUSH DX
MOV DL,AL
CMP DL,9 ; Determine whether <=9
JLE ADD1 ; yes ---> ASCII Code plus 30H
JNLE ADD2 ; No ---> ASCII Code plus 37H
ADD1: ADD DL,30H
JMP PRI
ADD2: ADD DL,37H
PRI: ; Show
MOV AH,02H
INT 21H
; Carriage return
MOV DX,0DH
INT 21H
; Add line breaks
MOV DL,0AH
INT 21H
POP DX
RET
PRINT ENDP
CODE ENDS
END STARTresult :

Corresponding relation :1-9 Show 1-9
10-35 Show A-Z
36-41 Show other characters
42-67 Show a-z
边栏推荐
- P3916图的遍历 题解
- Collection of linked list topics
- Avoid pitfalls and stay away from PUA in the workplace. You need to know the common routines and scripts of PUA!
- how to add square on screenshot
- 33-SparkSql的介绍、DataFrame和DataSet
- Detailed explanation of VAO
- 图的认识与存储
- Hcip day 9 notes
- 13.Unity2D 横版 可上下左右移动的双向平台(双向行走+可移动+单独判定)+随机平台生成
- MySQL -- subquery scalar subquery
猜你喜欢

*Code understanding * common function parsing in pytoch

Android kotlin uses a coroutine instead of a callback function (suspendcoroutine usage)

Detailed notes on pytoch building neural network

Super simple countdown code writing

Anaconda cannot shut down the method of forced shutdown

Debug No4 use renderdoc to troubleshoot bugs

Learning to track at 100 FPS with deep progression networks

13.Unity2D 横版 可上下左右移动的双向平台(双向行走+可移动+单独判定)+随机平台生成

Vertex buffer and shader (the cherno + leranopongl) notes

jmeter中JSON提取器使用
随机推荐
Intelligent robots and intelligent systems (Professor Zhengzheng of Dalian University of Technology) -- 4. Autonomous robots
[multithreading] five communication modes between multithreads
mysql使用explain分析sql执行计划帮助查找性能瓶颈
NFT是什么?一篇文章搞懂NFT的概念
Robert operator, Sobel operator, Laplace operator
图新地球:Revit建模的rvt格式BIM模型如何带着纹理精准匹配地图
13. Unity2d horizontal version of two-way platform that can move up, down, left and right (two-way walking + movable + independent judgment) + random platform generation
What is the NFT concept.. Fully understand NFT market, technology and cases
Kotlin higher order function & DSL layout persuasion Guide
Detailed notes on pytoch building neural network
abstract class
POJ3278抓住那头牛题解
Qt|字符串生成二维码功能
RBM contrast divergence
Do you know the use of string?
Opencv project practice - credit card recognition
MySQL 啥时候用表锁,啥时候用行锁?
MySQL uses explain to analyze SQL execution plans to help find performance bottlenecks
【MATLAB】(四)MATLAB在线性代数中的应用
Typescript double question mark operator