Quantcast
Channel: Printing a string in NASM Win16 Assembly - Code Review Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Shift_Left for Printing a string in NASM Win16 Assembly

$
0
0

You have all the elements. The only thing that can be eliminated is jmp .run, as follows:

org 0x100        mov     si, Prompt        call    puts        ret  puts: mov     ah, 0xe        mov     bx, 7 .read: lodsb        or       al, al        jnz     .post             ret .post: int     0x10        jmp     .read Prompt: db  'Hello World', 0

As INT 10H does not trash AH or BX, there is no need to reinitialize them each time through the loop.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>