Posted on 01/05/2014 1:29:47 AM PST by Bobalu
One of the most impressive entries for this (last?) years contest is a tiny 8086 PC emulator/virtual machine written in only 4043 bytes of code. Its a fully functional 80s-era PC emulator that can run vintage copies of AutoCAD, Windows, Lotus 1-2-3, and SimCity.
(Excerpt) Read more at hackaday.com ...
The entries are harder to read than a long Free Republic post without paragraphs :-)
Ping
Link to the 8086 emulator entry
http://www.ioccc.org/2013/cable3/hint.html
Now THAT’S efficient code!
LOL!
Back in the day I remember doing a class assignment to write a Z80 emulator that ran on a CDC Cyber 7600 in COMPASS assembly language. It took most of a semester and took a lot more than 4 KB to run.
Wow, COMPASS assembly language. I took a class in COMPASS back in 1981. Those CDC machines were pretty fast for their time, and I think the one we used had a 60 bit word size, which was different.
4k is the max allowed length of C source code for the contest.
This weighed in at 4043 bytes of C source.
No idea what it compiles to.
60 bit FIXED WORD LENGTH (bytes? what’s bytes? :o) When I took the class I’d already been programming in 808x assembly languages for a couple of years. It was not an easy transition. Fortunately I never had to make a living programming in COMPASS.
Unfortunately, 4043 bytes would be too big for my first PC. It was a Digital Equipment corp. PDP-11S, which had only 4096 bytes of core memory (albeit, they were 12 bit bytes). Adding the 17 byte bootstrap loader, would leave only 36 bytes for some kind of output device driver and formatting for it. At best, it would only output a string of numbers on a teletype.
The company that was never fully committed to the PC. Actually, IBM wasn't either.
I’ll bet it can run Obamacare better than what the feds came up with.
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.