# Print a number
B8 12 34 00 00  # eax = num             mov r32, imm32      B8+rd id
# Space:
B9 EE00+        # ecx = nbuf-1          mov r32, imm32      B8+rd id
C6 01 20        # [ecx] = ' '           mov r/m8, imm8      C6 /0 ib        00 000 001
E9 500-         # jump Numeral          jmp rel32           E9 cd

500: # Numeral  # div r/m32: Unsigned divide EDX:EAX by r/m32 -- EAX=quot EDX=rem
31 D2           # edx = 0               xor r/m32, r32      31 /r           11 010 010
F7 35 B00+      # divide by base        div r/m32           F7 /6           00 110 101
8A 92 A00+      # dl = [edx+Ascii]      mov r8, r/m8        8A /r           10 010 010
49 88 11        # [--ecx] = dl          dec; mov r/m8, r8   88 /r           00 010 001
85 C0           # cmp eax, 0            test r/m32, r32     85 /r           11 000 000
0F 85 500-      # jump Numeral if !=    jne rel32           0F 85 cd
# Write:
BA EE01+        # edx = nbuf            mov r32, imm32      B8+rd
29 CA           # edx -= ecx            sub r/m32, r32      29 /r           11 001 010
E8 54-          # call PutOut           call rel32          E8 cd
0F 8C 7F-       # jump Exit+1 if <      jl rel32            0F 8C cd
E9 79-          # jump Exit-1           jmp rel32           E9 cd

A00: 30 31 32 33 34 35 36 37 38 39      41 42 43 44 45 46           # numeral to Ascii
A30: 0 1 2 3 4 5 6 7 8 9    A41: A B C D E F    A61: A B C D E F    # Ascii to numeral

B00: 10         # base