Question: When using WriteHex to print out values, there is a 1 9 added to each one. For example, 0 9 EEB is printing out as

When using WriteHex to print out values, there is a 19 added to each one. For example, 09EEB is printing out as 00199EEB. How can I fix it to print out as it is written in the table code?
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
INCLUDE Irvine32.inc
.data
promptNT BYTE "The NUMS table: ",0
promptST BYTE "The Sorted NUMS table: ",0
promptCT BYTE "The Changed NUMS table: ",0
promptSWT BYTE "The Switched NUMS table: ",0
newline BYTE ODh, 0Ah, ODh, 0Ah,0
space BYTE "",0
NUMS WORD 09EEBh, 0B0CFh,061E5h,089EDh, 0AF17h,0D8D1h,06C1Dh,0594Eh,0CF55h
WORD 03767h,063C6h,0AE84h,0412Fh,0B226h,046C1h,0879Bh,076B6h,093FFh
WORD 0AFFFh, 05B8Fh,06164h,01CF7h,09A41h,0A525h,0A5A1h,08F05h,07E4Ch
WORD 0827Ah,090B0h,0722Dh,0BCCFh,033ABh, 0DC76h,085B6h,0AA5Fh,03FB3h
WORD 04BACh, 0B822h,07768h,0BF1Bh,05783h,07EEBh, 09F22h,0B85Bh,05312h
WORD 05971h,0B1B6h,0B16Dh,054B3h,073C8h,0586Bh,08170h,06F16h,092A0h
WORD 09680h,0A23Bh,0B45Dh,01E91h,0415Ah,0B5D9h,02D02h,06748h,03D39h
Console window output:
The NUMS table:
00199EEB 0019B0CF 001961E5001989ED 0019AF170019D8D100196C1D 0019594E 0019CF5500193767001963C60019AE840019412F 001
9B226001946C10019879B 001976B6001993FF 0019AFFF 00195B8F 0019616400191CF700199A410019A5250019A5A100198F0500197E
4C 0019827A 001990B00019722D 0019BCCF 001933AB 0019DC76001985B60019AA5F 00193FB300194BAC 0019B822001977680019BF1B
0019578300197EEB 00199F220019B85B 00195312001959710019B1B60019B16D 001954BC830019730019586B 0019817000196F16001
992A0001996800019A23B 0019B45D 00191E910019415A 0019B5D900192D020019674800193D39
printing PROC ; Print NUMS in a 7 x 9 table format
mov ecx, 7
mov esi, OFFSET NUMS
row_loop:
push ecx
mov ecx, 9
column_loop:
mov ax,[esi]
call WriteHex
mov edx, OFFSET space
call WriteString
add esi, 2
loop column_loop
pop ecx
loop row_loop
mov edx, OFFSET newline
call WriteString
ret
printing ENDP
Thank you
When using WriteHex to print out values, there is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!