M=m+2 //counter-to simulate wombat it increments in twos *loop reads machine instructions from file as string, splits it into (0)opcode and (1)addressĪnd assigns results to 2D array - marray*/ĭlocation=binarycon(marray) //assigns default value of data location locates the appropriate data location number and returns integer binarycon function converts string to its decimal equivalent Int dlocation //holds data location line number at 0 + value being held at location at 1 Cpusim bit order code#Since Wombat 1 only has 12 instructions it shouldn't be too hard to write a simulator for it or a cross-assembler that translates the Wombat code to some other assembly language or even C. I don't know what you want to accomplish but the next step could be to study the internals of CPUSim and try to understand what a simulation program might look like. Cpusim bit order download#So one approach would be to download CPUSim, get it to simulate Wombat 1, and then try to run the Wombat assembly files you have. That's nice but the good news is that it comes with an example CPU namely Wombat 1. I googled a little and came accross this,ĬPUSim seems to be a CPU simulation package written in Java. It seems to be both a highlevel functional language and a CPU. Say for example if I have a bunch of Wombat 1 code (which i may not have the best of knowledge), how can i use C++ to interpret/translate the code.Īssuming the codes are in separate text filesI've never heard about Wombat. Cpusim bit order windows#Please try avoiding to commiting lfm files when you did not change anything (lazarus writes windows arrangement into lfm's which we don't want to commit).I guess the above is one of the ancient methods of low level programming. The desktop file should be ready to use and goes into TODO: Use a scalable vektor graphics instead of png and fix paths in source code The icon src/cpusim.png should be located atĪnd the contents of the 'Examples' directory in To open the project in the Lazarus IDE just open the cpusim.lpi as a project. Skip the build-mode flag in order to build in debug mode. Lazbuild -build-mode=release -widgetset=qt -build-all -recursive cpusim.lpi You need to run lazarus before this at least once to set up the paths.Įxecute to build in release mode (optmizations such as O3 flags): There's already an (incomplete) PKGBUILD available in the AUR ( upstream URL) Building & Contributing Dependencies Included with the source code if you would like to read the terms of the license.īinary releases together with the corresponding source code can be found in the releases section of our GitHub page. This program is licensed under the GPL v.3. No special "games" or traffic lights as outputs available.This project started out as a school-project and to be a drop-in replacement for the aging sms32 Microprocessor Simulator but with some changes in mind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |