This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
34s:assembler [2011/07/15 10:41] admin Trial using new form plugin |
34s:assembler [2011/07/15 10:58] (current) admin Reverted; new form plugin not working |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Online Assembler/ | ||
+ | This page holds an **experimental** online assembler/ | ||
+ | |||
+ | In order to use this tool, enter your email address below, confirm the agreement, and paste in the code you want to compile. The resulting .dat file, along with any output of the compile, will be emailed to the address you provide below. | ||
+ | |||
+ | //The disassembler version of this tool will be available shortly.// | ||
+ | |||
+ | <note warning> | ||
+ | |||
+ | ==== WP 34s Assembler ==== | ||
+ | < | ||
+ | Action mail wp34s-compile@fatcity.com | ||
+ | Thanks " | ||
+ | Submit " | ||
+ | Yesno "I understand this tool is experimental, | ||
+ | Static " " | ||
+ | Email "Enter the email address which should receive the compiled version: " | ||
+ | Textarea "Paste your source code below: " | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ==== Documentation ==== | ||
+ | ---- | ||
+ | There is also a complete assembler/ | ||
+ | |||
+ | == Man page == | ||
+ | < | ||
+ | wp34s_asm.pl | ||
+ | |||
+ | Usage: | ||
+ | | ||
+ | | ||
+ | |||
+ | Parameters: | ||
+ | | ||
+ | as the filename extension. | ||
+ | -o outfile | ||
+ | the binary flash image. Assembler output extension is conventionally " | ||
+ | In disassembler mode, this is optional and will be the output ASCII source | ||
+ | listing, conventionally uses the " | ||
+ | used as an alternate method of capturing the ASCII source listing in disassembler | ||
+ | mode. | ||
+ | | ||
+ | -op infile | ||
+ | -fill fill_hex | ||
+ | -s number | ||
+ | disassembly mode. | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Examples: | ||
+ | $ wp34s_asm.pl great_circle.wp34s -o wp34s-3.dat | ||
+ | - Assembles the named WP34s program source file producing a flash image for the WP34s. | ||
+ | MUST use -o to name the output file in assembler mode -- cannot use output redirection. | ||
+ | |||
+ | $ wp34s_asm.pl | ||
+ | - Assembles multiple WP34s program source files into a single contiguous flash image for | ||
+ | the WP34s. Uses 0xFFFF as the optional fill value. Allows (and encourages) use of libraries | ||
+ | of programs by concatenating the flash image from several source files. | ||
+ | |||
+ | $ wp34s_asm.pl -dis wp34s-1.dat -s 3 > myProg.wp34s | ||
+ | $ wp34s_asm.pl -dis wp34s-1.dat -s 3 -o myProg.wp34s | ||
+ | - Disassembles a flash image from the WP34s. Prepend 3 asterisks to the front to each label to | ||
+ | make then easier to find in the listing (they are ignored during assembly). Both invocation | ||
+ | result in identical behaviour. | ||
+ | |||
+ | $ wp34s_asm.pl -dis wp34s-0.dat -o test.wp34s; wp34s_asm.pl test.wp34s -o wp34s-0a.dat; | ||
+ | - An end-to-end test of the tool. Note that the blank fill mode will have to have been the same | ||
+ | for the binaries to match. | ||
+ | |||
+ | Notes: | ||
+ | 1) Step numbers can be used in the source file but they are ignored. Since they are ignored, | ||
+ | it doesn' | ||
+ | 004, 003). The disassembler does produce step numbers that are both contiguous and monotonic | ||
+ | -- when not suppressed by the -ns switch. | ||
+ | 2) You can name a different opcode table using the -op switch. This can be used to translate a source | ||
+ | | ||
+ | the WP34s. Typically, disassemble the old flash using the old opcode table and reassemble using | ||
+ | the default (internal) table. This is also an insurance policy against the opcodes evolving as well. | ||
+ | | ||
+ | | ||
+ | $ svn up | ||
+ | $ cd ./trunk | ||
+ | $ make | ||
+ | $ ./ | ||
+ | $ wp34s_asm.pl -dis wp34s-0.dat -op new_opcodes.map > source.wp34s | ||
+ | 3) The prefill-value will be interpreted as decimal if it contains only decimal digits. If it | ||
+ | | ||
+ | " | ||
+ | will be interpreted as a hex value as well (61346). The leading " | ||
+ | 4) The order the command lines switches is not significant. There is no fixed order. | ||
+ | 5) There is subtle difference in using the disassembler with the " | ||
+ | With the " | ||
+ | be displayed on the screen. With redirection, | ||
+ | |||
+ | </ |