There are three modes in which PMSim can work: as Assembler, as Disassembler, or as Simulator. In the latter case, both code files and object files can be used. The program has been designed to work in batch mode, so that multiple -a, -d, -s options can be combined. Additionally, -m can be used to select the processor (see below), -v to increase the verbosity, and -i to run in interactive mode (also described later on). A program-specific option is -o to indicate the program counter offset.
Processor models are loaded dynamically, more might be added in the future. Right now, the model 'efei' represents a hypothetical processor which can be seen as a light version of the Motorola 6800, with only one accumulator available. The other model, '6800', supports the original processor with all features. As a proof-of-concept, the 'i386' model has also been added, but is not yet fully functional.
Code files are simple ASCII files which contain the mnemonics. Comments may be added by using a semi-colon, everything to the end of the line will then be discarded. For better readability, opcodes and operands may be written on separate lines. All numerical arguments are hexadecimal numbers without a 0x prefix. There are two special tokens: asterisk (*) and question mark (?), both representing uninitialized bytes in memory. The difference is that the question mark can be used to indicate variables, which the user can assign when running in interactive mode.
Back to index