This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[org 0x7c00] | |
mov dx, 0x1fb7 ; Set the value we want to print to dx | |
call print_hex ; Print the hex value | |
jmp $ ; Hang once we're done | |
%include "print_string.asm" | |
; Prints the value of DX as hex. | |
print_hex: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;program to copy from one string to another string without using string instructions | |
INCLUDE io.h | |
Cr EQU 0ah | |
Lf EQU 0dh | |
data SEGMENT | |
p_str1 DB Cr, Lf, 'Enter the string: ',0 | |
p_str2 DB Cr, Lf, 'The copied string is: ',0 |