Last Modified: October 30 2020 14:33:14
File: root - programs - 80x86_assembly_com - 2008 - 5 - ord.com
File Size: 0.25KB
@rem This file is generated by machine... at 2024-07-03 36:07:40
@rem .COM file to .BAT convertor,,, programmed by Zhihua Lai, 2008
@rem The .COM File Generated is size of 252 bytes.
@if exist %0.bat %0.bat
@debug < %0
@dir /l ord.com
@goto eof
e0100 e9 c6 00 41 53 43 49 49 20 52 65 76 65 72 73 65
e0110 20 4c 6f 6f 6b 75 70 20 55 74 69 6c 69 74 79 3a
e0120 20 4e 6f 20 65 6e 6f 75 67 68 20 70 61 72 61 6d
e0130 65 74 65 72 73 2e 0d 0a 24 50 61 72 61 6d 65 74
e0140 65 72 3a 20 41 20 53 74 72 69 6e 67 0d 0a 24 50
e0150 72 6f 67 72 61 6d 6d 65 64 20 62 79 20 5a 68 69
e0160 68 75 61 20 4c 61 69 2c 20 32 30 30 38 20 41 70
e0170 72 69 6c 2c 20 6a 75 73 74 20 66 6f 72 20 66 75
e0180 6e 2e 0d 0a 24 50 b4 02 cd 21 58 c3 9c 50 53 51
e0190 52 33 c9 bb 0a 00 33 d2 f7 f3 41 52 85 c0 75 f6
e01a0 5a 80 c2 30 b4 02 cd 21 e2 f6 5a 59 5b 58 9d c3
e01b0 b4 09 8d 16 03 01 cd 21 8d 16 39 01 cd 21 8d 16
e01c0 4f 01 cd 21 b8 01 4c cd 21 be 80 00 32 ed 8a 0c
e01d0 e3 de 46 fe c9 32 e4 46 8a 04 3c 20 74 17 8a d0
e01e0 e8 a2 ff b2 09 e8 9d ff e8 a1 ff b2 0d e8 95 ff
e01f0 b2 0a e8 90 ff e2 e0 b8 00 4c cd 21
n ord.com
r cx
fc
w
q
:eof
;;;; this assembly file is formated by zlai 2008 asm formatter. ;;;;
; ascii reverse look up
; programmed by zhihua lai,
; 2008 april 16, just for fun
.model tiny
code segment
org 100h
start:
jmp start1
msg1 db "ascii reverse lookup utility: no enough parameters.", 13, 10, "$"
msg2 db "parameter: a string", 13, 10, "$"
msg3 db "programmed by zhihua lai, 2008 april, just for fun.", 13, 10, "$"
putchar proc near
push ax
mov ah, 2h
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
noarg:
mov ah, 09h
lea dx, msg1
int 21h
lea dx, msg2
int 21h
lea dx, msg3
int 21h
mov ax, 4c01h
int 21h
start1:
mov si, 80h
xor ch, ch
mov cl, [si]
jcxz noarg
inc si
dec cl
xor ah, ah
chk:
inc si
mov al, [si]
cmp al, ' '
jz ok
mov dl, al
call putchar
mov dl, 9
call putchar
call putnumber
mov dl, 13
call putchar
mov dl, 10
call putchar
ok:
loop chk
mov ax, 4c00h
int 21h
code ends
end start
©2006~2024 SteakOverCooked - 0.00762 Seconds(s) - 3332.412 KB/s - 25 Online Memory: 471.23 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 !