473,698 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

8085 simulator in C

Hi everyone,

Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?

Jun 4 '07 #1
18 5699
In article <11************ **********@x35g 2000prf.googleg roups.com>,
ac***********@g mail.com <ac***********@ gmail.comwrote:
Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?
-Personally-, I wouldn't bother unless it was an assignment or
a pet learning project (and even then, I'd reconsider whether
8085 was the right choice of processors.)

If you wanted an 8085 simulator, I'd look around and try out
http://sourceforge.net/projects/sim85
or Vaneet Singla's 8085 simulator (available in a wide variety of places)
--
If you lie to the compiler, it will get its revenge. -- Henry Spencer
Jun 4 '07 #2
On Jun 4, 11:15 am, "activearun...@ gmail.com"
<activearun...@ gmail.comwrote:
Hi everyone,

Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?
http://www.google.com/search?hl=en&q...=Google+Search

Jun 4 '07 #3
On Jun 4, 1:30 pm, rober...@ibd.nr c-cnrc.gc.ca (Walter Roberson)
wrote:
In article <1180980953.503 669.203...@x35g 2000prf.googleg roups.com>,

activearun...@g mail.com <activearun...@ gmail.comwrote:
Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?

-Personally-, I wouldn't bother unless it was an assignment or
a pet learning project (and even then, I'd reconsider whether
8085 was the right choice of processors.)
I don't think 8085 is such a bad choice. Very simple instruction set.
I did this one weekend about 20 years ago just for the heck of it. I
had an old single board PC I wanted to emulate on a VAX.

The OP wanted suggestions on techniques to do this. As I recall, the
upper nibble of the opcode pretty much tells you what the instruction
will do, so I made an array of 16 functions and used the upper nibble
to index into the array. Then I had 16 individual functions to handle
the operations. The lower nibble is mostly for addressing, so that too
can index into an array for the correct register. Setting the flags
properly was the trickiest part.

Jun 5 '07 #4
ms*******@yahoo .com writes:
The OP wanted suggestions on techniques to do this. As I recall, the
upper nibble of the opcode pretty much tells you what the instruction
will do, so I made an array of 16 functions and used the upper nibble
to index into the array. Then I had 16 individual functions to handle
the operations. The lower nibble is mostly for addressing, so that too
can index into an array for the correct register. Setting the flags
properly was the trickiest part.
This sounds like a fun instruction set on which to practice
writing a (static or dynamic) binary translator. (Of course,
there's no way to actually run the translated code without
invoking undefined behavior, from a comp.lang.c point of view.)
--
Ben Pfaff
http://benpfaff.org
Jun 5 '07 #5
In article <11************ *********@w5g20 00hsg.googlegro ups.com>,
ms*******@yahoo .com writes
>On Jun 4, 1:30 pm, rober...@ibd.nr c-cnrc.gc.ca (Walter Roberson)
wrote:
>In article <1180980953.503 669.203...@x35g 2000prf.googleg roups.com>,

activearun...@ gmail.com <activearun...@ gmail.comwrote:
Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?

-Personally-, I wouldn't bother unless it was an assignment or
a pet learning project (and even then, I'd reconsider whether
8085 was the right choice of processors.)

I don't think 8085 is such a bad choice.
It is if you want o buy one... I am certain the are obsolete these
days,.
Very simple instruction set.
I did this one weekend about 20 years ago just for the heck of it. I
had an old single board PC I wanted to emulate on a VAX.
Exactly....20 years ago It might be technically nice but getting the HW
is another matter. As for the tools.... i will dust of the compiler on
the 5.25" floppies.....

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys. org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Jun 5 '07 #6
On Jun 5, 10:45 am, Chris Hills <c...@phaedsys. orgwrote:
In article <1181057388.694 969.70...@w5g20 00hsg.googlegro ups.com>,
mstork...@yahoo .com writes>On Jun 4, 1:30 pm, rober...@ibd.nr c-cnrc.gc.ca (Walter Roberson)
wrote:
In article <1180980953.503 669.203...@x35g 2000prf.googleg roups.com>,
activearun...@g mail.com <activearun...@ gmail.comwrote:
Can anyone give some idea about developing an 8085 simulator
program in C? What techniques can be handled to develop this?
-Personally-, I wouldn't bother unless it was an assignment or
a pet learning project (and even then, I'd reconsider whether
8085 was the right choice of processors.)
I don't think 8085 is such a bad choice.

It is if you want o buy one... I am certain the are obsolete these
days,.
Very simple instruction set.
I did this one weekend about 20 years ago just for the heck of it. I
had an old single board PC I wanted to emulate on a VAX.

Exactly....20 years ago It might be technically nice but getting the HW
is another matter. As for the tools.... i will dust of the compiler on
the 5.25" floppies.....
You can still get the Z80 at DigiKey. Same instruction set, even
easier to connect up (the address and data bus are not multiplexed
like on the 8085). But then the OP just wants to emulate it, not build
one (but I would suggest doing so anyway). And since he wants to do it
in C, if he has trouble along the way his questions will likely be on
topic for this group. As to the rest of this discussion...

Jun 5 '07 #7
ms*******@yahoo .com writes:
You can still get the Z80 at DigiKey. Same instruction set, even
easier to connect up (the address and data bus are not multiplexed
like on the 8085).
I think you are confusing 8080 and 8085.

--
Jean-Marc, who has programmed both but could be the one doing the confusion
Jun 5 '07 #8
On Jun 5, 11:28 am, Jean-Marc Bourguet <j...@bourguet. orgwrote:
mstork...@yahoo .com writes:
You can still get the Z80 at DigiKey. Same instruction set, even
easier to connect up (the address and data bus are not multiplexed
like on the 8085).

I think you are confusing 8080 and 8085.

--
Jean-Marc, who has programmed both but could be the one doing the confusion
Nope, the 8080 used an external clock generator (8224) and system
controller (8228) that were built into the 8085. There are a couple of
undefined opcodes in the 8080/8085 that the Z80 defined to extend the
architecture of the 8080/8085. It doubled the number of registers,
demuxed the IO, and added a few new registers. However, as long as you
don't use those undefined opcodes, it is 100% software compatible
(only the timing is different).

Jun 5 '07 #9
Ben Pfaff wrote:
>
ms*******@yahoo .com writes:
The OP wanted suggestions on techniques to do this. As I recall, the
upper nibble of the opcode pretty much tells you what the instruction
will do, so I made an array of 16 functions and used the upper nibble
to index into the array. Then I had 16 individual functions to handle
the operations. The lower nibble is mostly for addressing, so that too
can index into an array for the correct register. Setting the flags
properly was the trickiest part.

This sounds like a fun instruction set on which to practice
writing a (static or dynamic) binary translator. (Of course,
there's no way to actually run the translated code without
invoking undefined behavior, from a comp.lang.c point of view.)
How so? You have a struct holding the emulator's CPU registers, and a
64K unsigned char array (or two 32K arrays, since I seem to recall the
standard not requiring support for 64K arrays) representing the memory.

Now, emulating the hardware which might be surrounding the CPU is
another story. (Though you're probably more likely to run into
"implementa tion defined" or "unspecifie d" behavior than actual UB.)

:-)

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer .h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th***** ********@gmail. com>
Jun 5 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2304
by: Alex Vinokur | last post by:
C++ Simulator of a Universal Turing Machine can be downloaded at : * http://alexvn.freeservers.com/s1/utm.html * http://sourceforge.net/projects/turing-machine/ The program simulates a Universal Turing Machine (UTM). The UTM used in the Simulator is three-tape Turing Machine: * Tape#0 contains transition table and initial instantaneous description of a Particular Turing Machine (TM);
9
2631
by: Milk | last post by:
Hi all, Can anyone help me to do this Question. Coz this is my first time study C++ language and my lecture want me to do this kind of program, i really don't have any ideal pls help me here is the Question:: Improve the following (badly written) matrix multiplicationprogram and translate it into MIPs assembly language then assemble into machine language (hexadecimal representation). You may use a compiler to produce an assembly
61
16254
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step simulation - display registers contents I tried to search con google with no success.
0
1599
by: SatishPasala | last post by:
Hi I am developing a Windows Mobile application. I want Visual Studio to use Palm Simulator to display the application. Now it is pointing to Default Simulator. I downloaded the Palm Simulator. I need to add it to Visual Studio. Can some one help me to add the simulator?
0
1402
by: François | last post by:
Hi, My current job is to develop VoiceXML dialogs. The voice platform that we use provides neither a debugger nor a simulator, and each time I want to test a new dialog, I have to upload it on the remote production server, and to call the voice platform. So I would like to know where I can find a freeware VoiceXML simulator able to run a VoiceXML dialog. As my dialogs only use DTMF as an input, and text-to-speech synthesis for the...
1
4478
by: Ciko | last post by:
Was wondering how I could write a simple simulator (assembler CPU Z80). Thanks for any advice, link.
0
4075
by: Killingkids | last post by:
hello, everyone...im facing a big problem in my final year project, hope that u all can help me solve the problem ... i was doing a mobile web application which enable student to check the college information through mobile, however i just use simulator to test my system... one of modules or function was enable the student to downloads some notes which in txt file format through mobile.Hence, i tested using IE,it does not appear any problem, i...
0
1700
by: Killingkids | last post by:
hello, everyone...im facing a big problem in my final year project, hope that u all can help me solve the problem ... i was doing a mobile web application which enable student to check the college information through mobile, however i just use simulator to test my system... one of modules or function was enable the student to downloads some notes which in txt file format through mobile.Hence, i tested using IE,it does not appear any problem, i...
3
4738
by: DanielJohnson | last post by:
I was wondering if anyblody can suggest me a network simulator written in python in which I can add on my own code and extend its functionality. I am looking for a simulator which will simualte TCP, UDP, RTP and most networking protocol. The learning curve for ns2 and other simulator is too high for me at this time and thats why I am considering Python for it. Every help will be appreciated.
0
8673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.