; NASM -f obj [this-source]
; NASM -f obj [showbyte]
; ALINK [this-source] [showbyte] , [name-of-exe]
; this program prints var1 and var2 using Showbyte.
; if this program displays number correctly, then you have mastered a new skill:
; you can make and link external modules.
extern showbyte
segment stack stack
resb 100h
segment data
var1 db 86h                 ;replace with whatever value you wish
var2 db 0E5h                 ;replace with whatever value you wish
crlf db 0Dh,0Ah,'$'
segment code
..start:
mov ax, data
mov ds, ax
mov dl, [var1]
call showbyte
mov ah, 2
xchg dh, dl
int 21h
xchg dh, dl
int 21h
                ;CRLF, get cursor to next line
mov ah, 9
mov dx, crlf
int 21h
mov dl, [var2]
call showbyte
mov ah, 2
xchg dh, dl
int 21h
xchg dh, dl
int 21h
mov ax, 4C00h
int 21h