最后修改: October 30 2020 14:33:13
文件: root - programs - 80x86_assembly_com - 2008 - 5 - ascii.com
大小: 0.08KB
@rem This file is generated by machine... at 2024-07-05 10:07:41
@rem .COM file to .BAT convertor,,, programmed by Zhihua Lai, 2008
@rem The .COM File Generated is size of 85 bytes.
@if exist %0.bat %0.bat
@debug < %0
@dir /l ascii.com
@goto eof
e0100 eb 2b 50 b4 02 cd 21 58 c3 9c 50 53 51 52 33 c9
e0110 bb 0a 00 33 d2 f7 f3 41 52 85 c0 75 f6 5a 80 c2
e0120 30 b4 02 cd 21 e2 f6 5a 59 5b 58 9d c3 b9 80 00
e0130 8b c1 2d 80 00 f7 d8 e8 cf ff b2 20 e8 c3 ff 8a
e0140 d0 e8 be ff b2 0d e8 b9 ff b2 0a e8 b4 ff e2 e0
e0150 b8 00 4c cd 21
n ascii.com
r cx
55
w
q
:eof
;;;; this assembly file is formated by zlai 2008 asm formatter. ;;;;
; ascii table
; zhihua lai, 2008 may
; just for fun.
.model tiny
code segment
org 100h
start:
jmp start1
putchar proc near
push ax
mov ah, 2
int 21h
pop ax
ret
putchar endp
putnumber proc near
pushf
;save the flag
push ax
;save ax
push bx
;save bx
push cx
;save cx
push dx
;save dx
xor cx, cx
;clear cx
mov bx, 0ah
;radix=10
__lp:
xor dx, dx
;clear dx
div bx
;ax/=10
inc cx
;counter
push dx
;save the remainder
test ax, ax
;if ax!=0
jnz __lp
;then loop
__display:
pop dx
;restore the remainder reversely
add dl, 30h
;convert it to char
mov ah, 2h
;putsiglechar function
int 21h
;call 21h interrupt
loop __display
;count--, if counter!=0 then loop
pop dx
;restore dx
pop cx
;restore cx
pop bx
;restore bx
pop ax
;restore ax
popf
;restore the flag
ret
;return
putnumber endp
start1:
mov cx, 128
start2:
mov ax, cx
sub ax, 128
neg ax
call putnumber
mov dl, 32
call putchar
mov dl, al
call putchar
mov dl, 13
call putchar
mov dl, 10
call putchar
loop start2
;exit to dos
mov ax, 4c00h
int 21h
code ends
end start
©2006~2024 牛排过熟 - 0.0084 秒 - 7036.854 KB/s - 44 在线 内存: 499.09 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
牛排怎么做才好吃? | <meta name="机器人" content="不索引, 跟踪" />
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
评论 (0)
读写完全 - 一般 - 最小 - 表格 - 所有评论 - 统计
当前页暂时没有评论。