Advertisement
AdityaSriram

readme.txt

Feb 13th, 2013
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.96 KB | None | 0 0
  1. 8085 Microprocessor simulator (in Python)
  2. Latest release: Version 2.0.1
  3.  
  4. -----------------------------------------------------------------------------------
  5. Note:You need to have Python version 2.x to run these files, Python version 3.x might cause some problems.
  6. You may download Python from here: http://www.python.org/download/releases/2.7.3/
  7. -----------------------------------------------------------------------------------
  8. Note:It is recommended that you go with the latest version (2.0.1) unless you want to explore the coding of the other versions.
  9. -----------------------------------------------------------------------------------
  10. Contents:
  11. I. Downloading and placing files
  12. 1.Links
  13. a.Python Code
  14. b.'.py' files
  15. 2.Procedure
  16. a.Python Code
  17. b.'.py' files
  18. 3.File placement/heirarchy
  19. a.Version 1.0
  20. b.Version 1.1, 2.0, 2.0.1
  21. 4.Other resources
  22. II. Running the simulator program
  23. III.Operating the simulator
  24. -----------------------------------------------------------------------------------
  25.  
  26. ===================================================================================
  27.  
  28. I. Downloading and placing files
  29. 1.Links
  30. Information about how to use these links proceeds in section I.2 - "Procedure"
  31.  
  32. a.Python Code:
  33. up8085.py : http://pastebin.com/fihb3GTY (version2.0.1)
  34. led.py : http://pastebin.com/H62rfhMt (for version2.0.1)
  35.  
  36. up8085.py : http://pastebin.com/Ycy5uejR (version2.0)
  37. up8085.py : http://pastebin.com/FtBfKkgC (version1.1)
  38. up8085.py : http://pastebin.com/kurjfci0 (version1.0)(no longer functional)
  39. led.py : http://pastebin.com/s0hS6LU8 (common)
  40.  
  41. b.Complete '.py' file-sets:(easier)
  42. Version 1.0 http://www.mediafire.com/?5f31055e0t6d2
  43. Version 2.0 http://www.mediafire.com/?867tceb6bbj03
  44. Version 2.0.1 http://www.mediafire.com/?u758pbvx6m3mi
  45.  
  46. 2.Procedure
  47. a. Python Code
  48. If you decide to go with copy-pasting the Python code, here's what you have got to do:
  49. i. Decide the version you want to use and go to the respective links.
  50. The file 'led.py' is common for all versions except Version 2.0.1, for which you will save to use the file 'led.py' labeled as 'for version 2.0.1'
  51. ii. Before you copy the content from those links you have to create a folder by any name(say "8085") you want in any directory you want.
  52. iii.Then create a new folder by the name "bin" in the folder("8085") you just created, only if you are not going with version 1.0
  53. iv. Now go to the links and just press the little button with a yellow symbol marked on it to copy the text to clipboard or click the 'RAW' option above the text to go to a page containing just the content of the file and copy all the text here.
  54. v. Now open "Notepad" or any text-editor and paste all the copied text into the editor.Then save it in the folder("8085") with the name "up8085.py"
  55. vi. Repeat step(v) for the file "led.py" and save it in the same folder("8085") as you saved "up8085.py". You are almost done.
  56. vii.Now finally if you didn't decide to go with version 1.0, go to the link "opcode.txt" and repeat step(v) except this time in the editor save the file as "opcode.txt" in the folder("bin") which is inside the folder("8085").
  57. If you decided to go with version 1.0 you will need to copy the file "OpcodeSheet.pkl" and place it in the folder("8085").
  58. Head on to section II - Running the simulator program to start using the simulator.
  59. ix. You might want to install the font "Monaco.ttf" in your computer for
  60. aesthetic feel although this is completely optional.
  61.  
  62. b. Complete '.py' file-sets
  63. i. Select the version you want and go to the respective link
  64. ii. Now download the files "up8085.py" and "led.py" and place them in the
  65. same directory(say "8085").
  66. iii.Then if you are going with a version other than version 1.0 you can
  67. download the entire "bin" folder into the folder("8085") or you can create a folder by the name "bin" inside the folder("8085") and just download the file "opcode.txt" into this folder("bin")
  68. iv. If in case you decide to go with version 1.0 you have to download the
  69. file "OpcodeSheet.pkl" and place it along with the other two downloaded files - ("up8085.py" and "led.py")
  70. Head on to section II - Running the simulator program to start using the simulator.
  71. ix. You might want to install the font "Monaco.ttf" in your computer for
  72. aesthetic feel although this is completely optional.
  73.  
  74. 3.File placement/heirarchy
  75. After completing the above procedures your files should be placed as shown below, assuming the root directory to be "8085"
  76.  
  77.  
  78. a.Version 1.0
  79.  
  80. /8085
  81. -up8085.py
  82. -led.py
  83. -OpcodeSheet.pkl
  84.  
  85.  
  86. b.Versions 1.1, 2.0, 2.0.1
  87.  
  88. /8085
  89. -up8085.py
  90. -led.py
  91. /bin
  92. -opcode.txt (compulsory)
  93. -exp2b.dam (optional)
  94. -exp3.dam (optional)
  95. ... (optional)
  96. -sorting.dam (optional)
  97.  
  98. 4.Other Resources
  99.  
  100. To view a demonstration of version 1.0 of this simulator go to
  101.  
  102. Other version demonstrations coming soon...
  103.  
  104. For additional help you can email the creator at aditya95sriram@gmail.com
  105.  
  106. -----------------------------------------------------------------------------------
  107.  
  108. II.Running the simulator
  109.  
  110. 1.In order to run the simulator just double-click the file "up8085.py".
  111. 2.If that doesn't work try one of the following:
  112. a.Right-click on the file "up8085.py" and in the context menu select "Open with..." and select "Choose Program".
  113. This will open a dialog box, in this dialog box click "Browse" and navigate to the folder/directory where
  114. you installed Python and search for the file "python.exe". Then select that application
  115. as the program you want to open ".py" files with and click "Open".
  116. You will have to carry out that procedure only once and not everytime you want to open
  117. the file.
  118. b.Make sure you named all the files correctly and placed them in the proper directory. Check out section I.3 to
  119. compare the file heirarchy.
  120.  
  121. -----------------------------------------------------------------------------------
  122.  
  123. III.Operating the simulator
  124.  
  125. 1.For instructions and keyboard shortcuts/mappings press the F1 key(only in version 2.0.1)
  126.  
  127. 2.If you get stuck at any point press the "RST" key to reset the Microprocessor. This will result in the LEDs
  128. displaying "FrIEnd" meaning 'everything normal'.This is the 'reset' state and also the default state. Keep in mind that this does not clear all the memory.
  129.  
  130. 3.To set the content of any memory address
  131. a.Press "RST" button if not already in 'reset' state
  132. b.And then press the "SET" button, this will blank out the display, and the little dot beside the first four
  133. LEDs will light up(only in version 2.0.1) meaning the processor is ready to accept input in the address field.
  134. c.Now you may enter the address in the hexadecimal format using the number-pad buttons.
  135. d.On completion of address entry press the "INR" key to comfirm the address and move onto setting it's content.
  136. e.On pressing the "INR" key the little dot beside the last two LEDs will light up(only in version 2.0.1) meaning
  137. the processor is ready to accept input in the content field.
  138. f.Now again use the Number-pad buttons to input the desired content in hexadecimal format.
  139. g.To confirm the input and move on to the next memory location press the "INR" key again.
  140. h.Now repeat steps(e-g) till you have set the memory contents
  141. i.If in case you want to set the content of memory location not easily accessible from the current memory location, press "INR" to set the current memory location content, and then press "RST" and respeat steps (b-h)
  142.  
  143. 4.To execute the program
  144. a.Press the "RST" button
  145. b.Then press button "8" below which is written "GO".
  146. c.This will blank out the memory just as it would for entering the memory address in Section III.3.b
  147. d.Now enter the starting address of your program, or the address from where the execution should begin.
  148. e.After that press "EXEC" button to start execution
  149. f.Now while executing the program the processor displays "E" meanign execution in progress. Once the execution
  150. is done it will display "FrIEnd" or the 'reset' state if no error was encountered. If in case there was an error
  151. it will display "FError".
  152. Possible cause of the error may be failure to enter any data where the input was supposed to be.
  153. Note: The processor only initializes the memory locations visited while carrying out the procedure descrivbed in Section III.3 to '00 H' other memory locations do not exist at all, hence it is imperative to set all teh required memory locations with some value, rather the n relying on the processor to pick on trash values.
  154.  
  155. 5.To see the result of the program execution
  156. a.Memory locations
  157. After execution if not already in 'reset' mode, press "RST" key and then follow procedure described in
  158. Section III.3 to go to the memory location where the result is expected and see it's contents.
  159. b.Registers and flags
  160. i. To check the Flag status and the internal registers, it is recommended to execute the program once again
  161. using the method described in Section III.4.
  162. ii. Press "RST" if not in 'reset' state and then press the button "3" below which is written "REG".
  163. iii.This will blank out the display and wait for you to enter a register name to display it's content, any key
  164. on the Number-pad from 4-F will display the corresponding register written below it, except 'F' which will display the flag status.
  165. iv. Once a register is selected, other registers can be viewed by pressing the "INR" or "DCR" keys. Here
  166. pressing a key from the number pad will affect the register content.
  167.  
  168. 6.To save and load files
  169. a.This simulator supports files of type ".dam" (Data Assisting Microprocessor) for loading and saving the memory
  170. states.
  171. a.Press the "A" button below which is written "LOAD" to load a file and the "B" button below which is written
  172. "SAVE" to save the current memory content with a desired name.
  173.  
  174. -----------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement