We're looking for your comments on how to best organize the wiki's content.
Comparison of Developer Tools
This is a comparison of Developer Tools.
Contents |
[edit] Comparision of Assembler features
This compares the features of different Assemblers
(feel free to enter your own assembler and add new features/criteria)
| Assembler | Platform Independence | Little endian mode | Choice short/long literals | Expressions | Macros | Optimization | Linker support | Custom modules | Styling and syntax |
|---|---|---|---|---|---|---|---|---|---|
| DCPU Toolchain | Yes | Yes | Yes | Yes | Yes | Yes (Short literals+peep hole) | Yes | Yes (Lua) | Specific to target DCPU-16 |
| Organic | Yes* (on Mono) | Yes | Yes | Yes | Yes | Yes (Short literals) |
(?) |
Yes (.NET) | Similar to general assemblers |
| Assembler | Platform Independence | Little endian mode | Choice short/long literals | Expressions | Macros | Optimization | Linker support | Custom modules | Styling and syntax |
[edit] The "maximinus-thrax" tests
These tests started on reddit with a series of posts by user maximinus-thrax [1] [2] [3].
[edit] Assembler tests
This test suite checks the validity of assemblers.
[edit] Methodology
The tests are composed of four example programs written in DCPU-16 assembly which are run through the assembler being tested.
- Endian Format
- This is a simple check on whether the assembler produces little-endian bytecode, as specified in the 0x10c description [4]
- Notch's Code
- This is a combination of two example programs written by Notch. It is the de facto standard.
- Test Code
- Simple, more relaxed code, with mixed spaces, tabs, and case data.
- Instructions
- All instructions, in lower and upper case.
- Operands
- All operands, as both source and destination operands.
- Errors Caught
- A series of 15 errors tested individually. This test has a score associated with it. For each error, an assembler scores 0 points if the error was not spotted, 1 point if the program did something or failed to recognize the file, and 2 points if the assembler identified the error and warned the user.
- This score should be taken with a grain of salt since, for example, the last error is to flag a compile-time division by zero, which some may view as unfair.
Note that this testing methodology is not perfect. The assembler output is not checked for validity (though maximinus-thrax has discussed plans to do this [5]). See also the caveats given in the Errors description above.
Tests are executed in as blind a matter as possible. Results are given below. Comments after "Fail" results show the code that caused the failure.
[edit] Results
| Name | Date Tested | Endian Format | Notch's Code | Test Code | Instructions | Operands | Errors Caught | Comments |
|---|---|---|---|---|---|---|---|---|
| 0x10c-asm (Severb) | 2012-04-07 | Pass | Fail (set a, 0xbeef) | Fail (:start set a, 5) | Fail (:start jsr start) | Fail (:start set a, 5) | 15/30 (0 missed errors) | Can't handle lower case strings
|
| DCPU-16 (Mappum) | 2012-04-07 | Pass | Fail (dat) | Fail (dat) | Pass | Fail (?set a, [b + 3]?) | N/A | Could not automate error testing, so did not try
|
| dcpu-asm (Chris Forbes) | 2012-04-07 | Pass | Pass | Pass | Pass | Pass | 16/30 (4 missed errors) | Good.
|
| dcpu (Topher) | 2012-04-07 | Pass | Fail (:testsub) | Fail (?set?) | Fail (?jsr?) | Fail (?set?) | 18/30 (0 missed errors) | Error messages were vague.
|
| dcpu16py (jtauber) | 2012-04-11 | Pass | Pass | Pass | Pass | Fail (set a, [b + 3]) | 17/30 (0 missed errors) |
|
| dcpustud (Kosta) | 2012-04-07 | Pass | Pass | Pass | Pass | Fail | 16/30 (2 missed errors) | Good error messages (when they were caught)
|
| dcpu-emu (interfect) | 2012-04-07 | Pass | Fail | Fail | Pass | Fail (??) | 18/30 (6 missed errors) |
|
| Cobbler (BobDorian) | 2012-04-07 | Unknown (could not assemble minimal file) | Fail (ife [data+i]) | Fail (Could not read file) | Fail (:start jsr start -> reported missing operand) | Fail (set a, [b + 3] -> reported invalid operand) | 10/30 (10 missed errors) | Good error messages. Seems to be a bug in reading files.
|
| dcpu (deNULL) | 2012-04-07 | Pass | Fail (:loop SET [0x2000+I], [A]) | Fail (:start set a, 5) | Fail (:start jsr start) | Fail (:start set a, 5) | 24/30 (1 missed errors) | The best error messages.
|
| DCPU-16 Emulator in Javascript (@liam_galvin) | 2012-04-08 | Did not check | Fail (on [0x2000 + I]) | Fail (invalid opcode: a) | Fail (invalid opcode: start) | Fail (invalid opcode: a) | 17?/30 (Hard to test and be sure. 1 missed error) |
|
| dcpu16 (Iain Peet) | 2012-04-08 | Fail | Fail (??) | Pass | Pass | Fail (??) | 17/30 (3 missed errors) |
|
| DCPU (Kevin "teoryn" Stock) | 2012-04-08 | Fail | Pass | Pass | Pass | Pass | 19/30 (0 missed errors) | Good
|
| DCPU 16 Assembler (Chris "AgentME" Cowan) | 2012-04-08 | Fail | Pass | Pass | Pass | Pass | 24/30 (2 missed errors) | Good error reporting
|
[edit] Emulator tests
This test suite checks the validity of emulators.
[edit] Methodology
The tests are composed of four example programs written in DCPU-16 assembly which are compiled with an assembler and run on the emulator being tested.
- Endian Format / Minimal Test
- This is a minimal test program that just runs and exits. It is a single
start: set PC, startstatement [6]. This tests the exit condition as set by Notch, and whether it uses 8- or 16-bit little endian as the file format.
- Maths
- Tests some math calculations. The final value for
ain this test should be3. The final result is listed for failures.
- ItoA
- A simple integer to ASCII test.
[edit] Results
| Name | Date Tested | Compiler Used | Endian Format | Minimal | Maths | Graphics | ItoA | Comments |
|---|---|---|---|---|---|---|---|---|
| DCPU-16 Studio (Kostas "badsector" Michalopoulos) | 2012-04-09 | dcpu-asm (Chris Forbes) | 8-bit little endian | Pass | Pass | Partial pass (ran, but no display) | Partial pass (ran, but no display) | Display didn't work, even when I wrote a test program. Could be a Linux thing.
|
| dcpu (Matt 'hellige' Hellige) | 2012-04-15 | dcpu-asm (Chris Forbes) | 8-bit big endian (optionally little-endian) | Pass (command line flag to treat infinite loop as halt) | Pass | Pass | Pass | Terminal interface, some nice options.
|
| dcpu-emu (interfect) | 2012-04-09 | dcpu-asm (Chris Forbes) | 8-bit little endian | Pass | Fail (a=12) | Pass | Pass | Despite the maths fail, very good command line tool
|
[edit] References
- ↑ http://www.reddit.com/r/dcpu16/comments/rxua0/analysis_testing_of_0x10x_compilers/
- ↑ http://www.reddit.com/r/dcpu16/comments/rz74b/analysis_testing_of_0x10x_compilers_round_ii/
- ↑ http://www.reddit.com/r/dcpu16/comments/s0qgr/exhaustive_list_of_emulators_tested/
- ↑ http://0x10c.com/
- ↑ http://www.reddit.com/r/dcpu16/comments/rxua0/analysis_testing_of_0x10x_compilers/
- ↑ http://www.reddit.com/r/dcpu16/comments/s0qgr/exhaustive_list_of_emulators_tested/c4a6tff
| ||||||||

