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

📄 lt512b.asm

📁 钱晓杰汇编语言的很多例子 非常经典 我从微辅网上下载的 希望对大家有用
💻 ASM
字号:
;LT512B.ASM	;;;;;;;;
 dispchar    macro char
    mov dl,char
    mov ah,2
    int 21h
    endm
dispmsg macro message
    mov dx,offset message
    mov ah,9
    int 21h
    endm
	.model small
	.stack
	.data
msg1	db 'Please enter the number (xx):',0dh,0ah,'$'
msg2	db 'The numbers entered are:',0dh,0ah,'$'
msg3	db 'The sorting result (ascending):',0dh,0ah,'$'
crlf	db 0dh,0ah,'$'
maxcount = 100
count	dw ?
buf	db maxcount dup(?)
	.code
	public count
	extern ALdisp:near,sorting:near,input:far
	.startup
	dispmsg msg1
	mov bx,offset buf
	call input
	cmp cx,0
	je start4
	mov count,cx
	dispmsg crlf
	dispmsg msg2
	mov bx,offset buf
	mov cx,count
start2: mov al,[bx]
	call ALdisp
	dispchar ','
	inc bx
	loop start2
	dispmsg crlf
	mov bx,offset buf
	mov cx,count
	call sorting
	dispmsg msg3
	mov bx,offset buf
	mov cx,count
start3: mov al,[bx]
	call ALdisp
	dispchar ','
	inc bx
	loop start3
	dispmsg crlf
start4: .exit 0
	end

⌨️ 快捷键说明

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