-e 200 "Az"
-a
1BD8:0100 mov bx, word [200]
1BD8:0104 mov cx, 3
1BD8:0107 mov ah, 2
1BD8:0109 mov dl, bl
1BD8:010B int 21
1BD8:010D mov dl, bh
1BD8:010F int 21
1BD8:0111 add bx, FF01
1BD8:0115 loop 109
1BD8:0117 mov dl, 0D
1BD8:0119 int 21
1BD8:011B mov dl, 0A
1BD8:011D int 21
1BD8:011F mov ax, 4C00
1BD8:0122 int 21
1BD8:0124
-g
AzByCx
What does this do?
initialises word at ds:200h
to the string "Az" (little endian low byte is "A", high byte is "z")
use A
command to assemble the following program:
load from memory into register bx
(to initialise the register without having to look up the numeric ASCII codepoints)
set up cx
as loop counter for three iterations
set up register ah
for the interrupt 21h service 02h (display character in dl
)
display character read from bl
(low byte of bx
)
display character from bh
(high byte of bx
)
add 1 to bl
and -1 (in two's complement resulting in 0FFh) to bh
which increments the codepoint in bl
and decrements the one in bh
loop back to display subsequent letters
display a linebreak (codepoints 13 and 10, or 0Dh 0Ah) to make the output easier to read
terminate program
use G
command to run the program