38 lines
454 B
NASM
38 lines
454 B
NASM
cpu 8086
|
|
org 0x3000
|
|
|
|
mov bx, si
|
|
|
|
rotloop:
|
|
cmp byte [bx], 0
|
|
jz .end
|
|
|
|
cmp byte [bx], 'A'
|
|
jl .next
|
|
cmp byte [bx], 'M'
|
|
jle .inc
|
|
cmp byte [bx], 'Z'
|
|
jle .dec
|
|
|
|
cmp byte [bx], 'a'
|
|
jl .next
|
|
cmp byte [bx], 'm'
|
|
jle .inc
|
|
cmp byte [bx], 'z'
|
|
jle .dec
|
|
|
|
.next:
|
|
inc bx
|
|
jmp short rotloop
|
|
|
|
.inc:
|
|
add byte [bx], 13
|
|
jmp short .next
|
|
.dec:
|
|
sub byte [bx], 13
|
|
jmp short .next
|
|
.end:
|
|
|
|
mov ah, 2
|
|
int 0x21
|
|
int 0x20
|