[s] IMM b = 0x62 [s] IMM c = 0x8 [s] IMM a = 0 [s] SYS 0x4 a [s] ... read_memory ----> read a1[0x62] aaa [s] ... return value (in register a): 0x4 [s] IMM b = 0x82 [s] IMM c = 0x1 [s] IMM a = 0xc8 [s] STM *b = a ----> a1[b]=a ====> a1[0x82]=0xc8 [s] ADD b c ----> b=b+c ====> b=0x83 [s] IMM a = 0xfc [s] STM *b = a ----> a1[b]=a ====> a1[0x83]=0xfc [s] ADD b c ----> b=b+c ====> b=0x84 [s] IMM a = 0x5b [s] STM *b = a ----> a1[b]=a ====> a1[0x84]=0x5b [s] ADD b c [s] IMM a = 0xa8 [s] STM *b = a ----> a1[b]=a ====> a1[0x85]=0xa8 [s] ADD b c [s] IMM a = 0x58 [s] STM *b = a ----> a1[b]=a ====> a1[0x86]=0x58 [s] ADD b c [s] IMM a = 0xf4 [s] STM *b = a ----> a1[b]=a ====> a1[0x87]=0xf4 [s] ADD b c [s] IMM a = 0x6b [s] STM *b = a ----> a1[b]=a ====> a1[0x88]=0x6b [s] ADD b c [s] IMM a = 0xce [s] STM *b = a ----> a1[b]=a ====> a1[0x89]=0xce [s] ADD b c
[s] IMM b = 0x42 [s] IMM c = 0x6 [s] IMM a = 0 [s] SYS 0x8 a [s] ... read_memory read(0, a1[0x42], 0x6) j [s] ... return value (in register a): 0x2 [s] IMM b = 0x62 [s] IMM c = 0x1 [s] IMM a = 0xa2 [s] STM *b = a a1[0x62] = 0xa2 [s] ADD b c [s] IMM a = 0x22 [s] STM *b = a a1[0x63] = 0x22 [s] ADD b c [s] IMM a = 0xfb [s] STM *b = a a1[0x64] = 0xfb [s] ADD b c [s] IMM a = 0x44 [s] STM *b = a a1[0x65] = 0x44 [s] ADD b c [s] IMM a = 0x11 [s] STM *b = a a1[0x66] = 0x11 [s] ADD b c [s] IMM a = 0x52 [s] STM *b = a a1[0x67] = 0x52 [s] ADD b c [s] IMM b = 0x62 [s] LDM b = *b b = 0xa2 [s] IMM a = 0x42 [s] LDM a = *a a = a1[0x42] [s] CMP a b
if ( (*(_BYTE *)(a1 + 262) & 0x10) == 0 )
[s] IMM b = 0x63 [s] LDM b = *b [s] IMM a = 0x43 [s] LDM a = *a [s] CMP a b
if ( (*(_BYTE *)(a1 + 262) & 0x10) == 0 )
[s] IMM b = 0x64 [s] LDM b = *b [s] IMM a = 0x44 [s] LDM a = *a [s] CMP a b
if ( (*(_BYTE *)(a1 + 262) & 0x10) == 0 )
[s] IMM b = 0x65 [s] LDM b = *b [s] IMM a = 0x45 [s] LDM a = *a [s] CMP a b
if ( (*(_BYTE *)(a1 + 262) & 0x10) == 0 )
[s] IMM b = 0x66 [s] LDM b = *b [s] IMM a = 0x46 [s] LDM a = *a [s] CMP a b
if ( (*(_BYTE *)(a1 + 262) & 0x10) == 0 )
[s] IMM b = 0x67 [s] LDM b = *b [s] IMM a = 0x47 [s] LDM a = *a [s] CMP a b
[s] IMM b = 0x7d [s] IMM c = 0x6 [s] IMM a = 0 [s] SYS 0x4 a [s] ... read_memory read a1[0x7d] aaa [s] ... return value (in register a): 0x4 [s] IMM b = 0x9d [s] IMM c = 0x1 [s] IMM a = 0xbe [s] STM *b = a a1[0x9d] = 0xbe [s] ADD b c [s] IMM a = 0x51 [s] STM *b = a a1[0x9e] = 0x51 [s] ADD b c [s] IMM a = 0x36 [s] STM *b = a a1[0x9f] = 0x36 [s] ADD b c [s] IMM a = 0x82 [s] STM *b = a a1[0xa0] = 0x82 [s] ADD b c [s] IMM a = 0xb8 [s] STM *b = a a1[0xa1] = 0xb8 [s] ADD b c [s] IMM a = 0x2d [s] STM *b = a a1[0xa2] = 0x2d [s] ADD b c [s] IMM b = 0x9d [s] IMM c = 0x1 [s] LDM a = *b a=0xbe [s] IMM d = 0x89 [s] ADD a d a=0x147 [s] STM *b = a a1[0x9d] = 0x47 [s] ADD b c [s] LDM a = *b [s] IMM d = 0x81 [s] ADD a d [s] STM *b = a a1[0x9d] = 0xd2 [s] ADD b c [s] LDM a = *b [s] IMM d = 0xd7 [s] ADD a d [s] STM *b = a a1[0x9d] = 0x0d [s] ADD b c [s] LDM a = *b [s] IMM d = 0xa8 [s] ADD a d [s] STM *b = a a1[0x9d] = 0x2a [s] ADD b c [s] LDM a = *b [s] IMM d = 0xa4 [s] ADD a d [s] STM *b = a a1[0x9d] = 0x5c [s] ADD b c [s] LDM a = *b [s] IMM d = 0xf [s] ADD a d [s] STM *b = a a1[0x9d] = 0x3c [s] ADD b c [s] IMM b = 0x9d [s] LDM b = *b [s] IMM a = 0x7d [s] LDM a = *a [s] CMP a b [s] IMM b = 0x9e [s] LDM b = *b [s] IMM a = 0x7e [s] LDM a = *a [s] CMP a b [s] IMM b = 0x9f [s] LDM b = *b [s] IMM a = 0x7f [s] LDM a = *a [s] CMP a b [s] IMM b = 0xa0 [s] LDM b = *b [s] IMM a = 0x80 [s] LDM a = *a [s] CMP a b [s] IMM b = 0xa1 [s] LDM b = *b [s] IMM a = 0x81 [s] LDM a = *a [s] CMP a b [s] IMM b = 0xa2 [s] LDM b = *b [s] IMM a = 0x82 [s] LDM a = *a [s] CMP a b [s] IMM a = 0x1 [s] IMM b = 0 [s] IMM c = 0x1
flag = '' for i in aaa: print(hex(i)) if i < 0: flag = hex(0x100+i)[2:].rjust(2, '0') + flag print(hex(0x100+i)) else: flag = hex(i)[2:].rjust(2, '0') + flag print(hex(i)) print()