;; List of numbers, Decimal, Hex, and Binary value INCLUDE PCMAC.INC INCLUDE VIDEO.INC .MODEL SMALL .STACK 100h .DATA Msg DB "Start at: $" Max EQU 65536 .CODE Main PROC EXTRN PutUDec : NEAR, PutHex : NEAR, PutBin : NEAR, GetDec : NEAR mov ax, @data mov ds, ax _CLS _PutStr Msg call GetDec mov cx, ax _CLS while1: inc cx cmp cx, 10000 jnb NoTK _PutCh '0' NoTK: cmp cx, 1000 jnb NoK _PutCh '0' NoK: cmp cx, 100 jnb NoC _PutCh '0' NoC: cmp cx, 10 jnb NoTen _PutCh '0' NoTen: mov ax, cx call PutUDec _PutCh 32,'-',32 mov ax, cx call PutHex _PutCh 'h',32, '-',32 mov ax, cx call PutBin _PutCh 13, 10 mov ah, 01h int 16h jnz Out1 cmp cx, Max jne While1 Out1: mov al, 0 ; Return code of 0 mov ah, 4ch ; Exit back to MS/PCDOS int 21h Main ENDP END Main