I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.9 Years
This post applies to an OLD version of the program only

Old post:
OK, but to do this at the moment, I do:
pksv ruby.gba ABCDEF > script.txt
Check here to see some of my compiler woes implementing the feature:

Compiler blues atm :(
In file included from codeproc.h:182,
                 from pksv.c:28:
decompiler.h: In function `writescr':
decompiler.h:50: error: syntax error before "va_list"
decompiler.h: In function `DecodeProc':
decompiler.h:73: warning: assignment from incompatible pointer type
Fixed with a simple replacement of va_list with va_arg (simple mistake)
and placing (typeof(func)) before one of the lines.
Now, I'm getting:
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s: Assembler messages:
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2681: Error: ambiguous operand size for `cmp'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2683: Error: ambiguous operand size for `dec'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2686: Error: no such instruction: `movl -16(%ebp),%edx'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2687: Error: no such instruction: `leal -16(%ebp),%eax'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2688: Error: no such instruction: `addl $4,(%eax)'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2689: Error: no such instruction: `movl (%edx),%eax'
C:\DOCUME~1\Charles\LOCALS~1\Temp/ccmybaaa.s:2690: Error: no such instruction: `movl %eax,-65564(%ebp)'
All solved with vsprintf. Good old vsprintf. Also freed about 6 bytes of memory!

New post:

Hey people! I got a new version out today.
It can decompile codes for the slot-machine much better now, with commands for altering and checking the coin case, and some purely semantic commands (to prevent false data being decompiled).
The unknown commands are prefixed with a "CMD_" both in the program AND in the decompiled code, and are useless until I find out what they actually do :D
@swampert22: This version can now do that!


Random no-confirmation trading script
setvar 0x8004 0x0 ' Their poke, slot number (still don't know the variable for trainer)
setvar 0x8005 0x0 ' Our poke, slot number [0-5]
special 0xfd
special 0xfe
Plz not to PM me, I don't come here often enough. Email if you need me