PASM Single Line SImulation
T Chap
Posts: 4,223
I have always wanted to have a tool to test PASM instructions one-off without having to memorize or refer to the manual. As a learning and reference tool, I have an idea to create a library with an instruction name and simple formula that the app can use to perform a function on a single line of code and show the result.
Any thoughts on whether this is useful or not? Obviously I am thinking of a simple set of library functions, not the full scope of the language. I think it would be not too difficult to parse a text file for the instruction name and formula, use a drop down menu to load the function, the hit RUN to see the result. A few variables could sit below for easy recall via drop downs as well.
Any thoughts on whether this is useful or not? Obviously I am thinking of a simple set of library functions, not the full scope of the language. I think it would be not too difficult to parse a text file for the instruction name and formula, use a drop down menu to load the function, the hit RUN to see the result. A few variables could sit below for easy recall via drop downs as well.
Comments
-Phil
It would be really nice if you could enter and see the results as binary, decimal, hex, and ASCII.
C.W.
Instruction Equation Description
cmp if x < y compare etc etc etc
The parts can be accumulated into a text file and shared.
"see the results as binary, decimal, hex, and ASCII." conversion for display is easy.
C.W.
-method of demonstrating the instruction including rules
-method to pass the code a par from the caller
-method to display a set of text notes for the instruction. limit on chars? maybe 100 words?
-method to detect and show errors ( value input too big etc)
-method to store some number of longs, words, bytes as in a DAT section, then call the values with dropdown menu near text field
-method to run some number of back to back instructions
Non working example:
The desktop application (multi platform build) will allow the ability to select an instruction from a drop down, then inter some data and add any flags to update. The library part will contain the rules, error messages, etc, and the app will show the output with flags, plus show an errors plus error message that the user wants it to show.
The app is currently 2450kb. The binary for the Xojo project is 173kb. The Xojo app building software is free and will build fully functional builds, but they build will time out after 5 minutes I think. I have the licensed versions. If anyone had an interest, I will post the Xojo binary and builds. My hope was that others would have an interest and a collection of scripts could evolve. I may include the multi viewable values (dec, hex, bin) later.
The goal is to have it as a reference tool for myself for future needs as the use of PASM will be increasing.
Are there any plans to import the instruction's default setting (e.g. cmp is NR, sub is WR, rdxxxx is always WR, wrxxxx is always NR)? Or is it more like pick the base instruction and make up your mind about NR/WR (cmp/sub, test/and, ...)?
There needs to be a second set of instructions that can be ran after the first set, the second set containing the conditions ie if_z, if_c, if_ae etc. Maybe add a second drop down menu for the conditionals to keep them separate.
I am experimenting with a link to a drop box to the xojo projecxt, PC build, script folder and scripts, Download zip, extract. Run App found under builds, click "Instruction", select folder for the scripts. Click on script. Check WZ and WC to test, change the values and hit run.
https://www.dropbox.com/s/lc3u2ei922dcz86/PasmSim.zip