Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- push ourstr
- call OurProc
- mov ah, 09h
- mov dx, ourstr
- int 21h
- EchoWait:
- mov ax, 0c08h ;like "readln;" in delphi
- int 21h
- test al,al
- jnz Skip
- mov ah, 08h
- int 21h
- Skip:
- ret
- ;=====================================
- ourstr db ' z att che t hello how are you ?',0,'$'
- OurProc:
- push bp
- mov bp, sp
- pusha
- mov di, [bp+4]
- mov al, ' '
- .Cycle:
- scasb
- je .Change
- cmp byte[di], 0
- jne .Cycle
- jmp .EndProc
- .Change:
- cmp byte[di], 'a'
- jb .Cycle
- cmp byte[di], 'z'
- ja .Cycle
- add byte[di], 'A'-'a'
- jmp .Cycle
- .EndProc:
- popa
- pop bp
- ret 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement