Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: emulating 8086 subset. |
| Date | 2015-06-27 13:02 +0100 |
| Organization | go, ion artisan! |
| Message-ID | <mmm3a2$564$1@dont-email.me> (permalink) |
| References | <35f8a764-53e4-4dba-ac10-e9c7dc05727f@googlegroups.com> <cv798iFqn7qU1@mid.individual.net> <eff99871-2640-4e06-ac02-c325722591fb@googlegroups.com> |
On 27/06/15 10:51, luser droog wrote:
> On Saturday, June 27, 2015 at 4:38:34 AM UTC-5, Ian Collins wrote:
>> luser droog wrote:
>> > Brain going numb trying to overdesign this apl jiterpreter,
>> > and reading this tutorial on category theory for programmers.
>> > So I tried a little fun project to rewrite my postscript
>> > 8086 emulator to (superterse) C.
>> >
>> > And then I got stumped. I'm trying to handle the decoding
>> > of the mod-reg-reg/mod byte, and I want to represent it
>> > as a "tuple" of {destination-pointer, left-opand, right-op},
>> > but I'm getting hung up trying to define this structure
>> > so it handles byte or word data conveniently.
>> >
>> > I want to have the arguments and result available for
>> > calculating flags, hence the "tuple" idea. But, well,
>> > hopefully the English here explains where I'm stumped.
>> > The code, ... ....
>> >
>> > cat a8086.c
>> > #include<stdio.h>
>> > #include<sys/stat.h>
>> > #include<unistd.h>
>> > #define P printf
>> > #define R return
>> > #define T typedef
>>
>> I'm sure most readers switch off at this point...
I did.
> Understood, but I'm in so deep I fear only a brave few
> may save me. But, if you stop there, you miss the
> X macro.
I did.
But I like to imagine myself as being one of the brave few, so I *will*
at least try to save you, and here's how:
*Lose the macros*. They're not helping you. The only possible
justification for them is in an IOCCC entry.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-27 00:34 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-27 01:18 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-27 01:28 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-28 21:21 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-28 22:50 -0700
Re: GOLFulating 8086 subset. gensym? luser droog <luser.droog@gmail.com> - 2015-07-01 15:36 -0700
Re: GOLFulating 8086 subset. gensym? luser droog <luser.droog@gmail.com> - 2015-07-01 16:02 -0700
Re: GOLFulating 8086 subset. gensym? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-01 16:11 -0700
Re: GOLFulating 8086 subset. gensym? luser droog <luser.droog@gmail.com> - 2015-07-01 16:52 -0700
Re: GOLFulating 8086 subset. gensym? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-01 16:56 -0700
Re: GOLFulating 8086 subset. gensym? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-01 22:12 -0700
Re: emulating 8086 subset. Ian Collins <ian-news@hotmail.com> - 2015-06-27 21:38 +1200
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-06-27 02:51 -0700
Re: emulating 8086 subset. Richard Heathfield <rjh@cpax.org.uk> - 2015-06-27 13:02 +0100
Re: emulating 8086 subset. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-27 14:25 +0100
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-07-11 00:51 -0700
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 01:54 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-07-11 01:58 -0700
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 01:59 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-07-11 02:13 -0700
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 02:34 -0700
Re: emulating 8086 subset. Bartc <bc@freeuk.com> - 2015-07-11 10:50 +0100
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 02:58 -0700
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 02:52 -0700
Re: emulating 8086 subset. Bartc <bc@freeuk.com> - 2015-07-11 10:38 +0100
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-07-11 03:16 -0700
Re: emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-11 03:19 -0700
emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-27 03:07 -0700
emulating 8086 subset. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-27 03:58 -0700
Re: emulating 8086 subset. luser droog <luser.droog@gmail.com> - 2015-07-10 10:51 -0700
Re: emulating 8086 subset. JohnF <john@please.see.sig.for.email.com> - 2015-07-11 10:07 +0000
csiph-web