# Print a list of numbers BF 04 00 00 00 # edi = 4 (lenArr) mov r32, imm32 B8+rd id E8 200- # call Show call rel32 E8 cd 31 DB # ebx = 0 xor r/m32, r32 31 /r 11 011 011 E9 7A- # jump Exit jmp rel32 E9 cd 200: # Show # 31 DB # ebx = 0 (index) xor r/m32, r32 31 /r 11 011 011 E9 300- # jump .number jmp rel32 E9 cd 300: # .number # 3B DF # cmp ebx, edi cmp r32, r/m32 3B /r 11 011 111 7C 01 # jump +1 if < jl rel8 7C cb C3 # return ret C3 8B 04 9D B04+ # eax = [4*ebx+Arr] mov r32, r/m32 8B /r 00 000 100 10 011 101 # .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 53 # push ebx push r32 50+rd S: index E8 54- # call PutOut call rel32 E8 cd 0F 8C 7F- # jump Exit+1 if < jl rel32 0F 8C cd 5B # pop ebx pop r32 58+rd S: 43 # ebx++ inc r32 40+rd E9 300- # jump .number 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 B04: 1 # Arr B08: 2 B0C: 56 34