Last Modified: October 30 2020 14:33:13
File: root - programs - 80x86_assembly_com - 2008 - 5 - ascii.com
File Size: 0.08KB
@rem This file is generated by machine... at 2024-06-29 13:06:53
@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 SteakOverCooked - 0.01842 Seconds(s) - 1263.026 KB/s - 25 Online Memory: 471.31 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !