From: Rod Pemberton on

"Wolfgang Kern" <nowhere(a)never.at> wrote in message
news:f7q1sm$ek5$4(a)newsreader2.utanet.at...
>
> I once used a similar (more Zilog Z-80 based) syntax on my HEX_WORK85
> disassembler/Hex-editor for several different CPU/MC/MP families.
> But I also have some trouble to read through Herberts code when it
> isn't accompanied by hexadecimal machine-code.
>

Sorry to tell you, but I tried your HexTutor about six months ago. It blew
up...


Rod Pemberton

From: Wolfgang Kern on

Rod Pemberton mentioned:
[]
> Sorry to tell you, but I tried your HexTutor about six months ago.
> It blew up...

How ? Wich trigger did you pull ?
It should work on win98 and XP.
Ok, the demo still got a few known syntax and sizecast bugs,
but 'blew up'?

__
wolfgang






From: Rod Pemberton on

"santosh" <santosh.k83(a)gmail.com> wrote in message
news:f7ql53$c8c$1(a)aioe.org...
> > case 0x05: {la[--j] = la[j] / la[j+1]; break;}
> >

> case 0x05:
> {
> la[j-1] = la[j] / la[j+1];
> j--;
> break;
> }
>

1) K&R C and the early DMR C compilers aren't LALR(1).
2) Most "modern" (old today...) C compilers are based on Steve Johnson's
1975 (or so) Portable C Compiler. PCC is YACC based and LALR(1).
3) PCC replaced DMR in most versions of UNIX.
4) Typedef's were added to C in 1976, and aren't LALR(1)...
5) Although not required by the standards, most people intuitively
understand C to be LALR(1) (which is due to PCC's strong influence on later
compilers).
6) The BNF grammars in the various C standards are YACC-able BNF, i.e.,
LALR(1).
7) This history is largely lost...


I.e., assuming LALR(1) and applying precedence, the above is:
case 0x05:
{
--j;
la[j] = la[j] / la[j+1];
break;
}

It appears that DJGPP (GCC) works properly while OpenWatcom v1.3 fails. I'd
guess that most K&R style compilers work.


Rod Pemberton

From: Rod Pemberton on

"Wolfgang Kern" <nowhere(a)never.at> wrote in message
news:f7sioq$bgv$1(a)newsreader2.utanet.at...
>
> Rod Pemberton mentioned:
> []
> > Sorry to tell you, but I tried your HexTutor about six months ago.
> > It blew up...
>
> How ? Wich trigger did you pull ?
> It should work on win98 and XP.
> Ok, the demo still got a few known syntax and sizecast bugs,
> but 'blew up'?
>

:) All I remember is that it halted or hung right after startup...

I figured it might've been due to various SE "enhancements" from Axcel216...
;)

I'm using Win98SE full using a special non-destructive install over Win98FE
upgrade using Win3.1 auth. plus Axcel216 stuff. :)

I've also got my partitions reversed. I.e., Windows isn't on C, but D.


Rod Pemberton

From: T.M. Sommers on
Rod Pemberton wrote:
> "santosh" <santosh.k83(a)gmail.com> wrote in message
> news:f7ql53$c8c$1(a)aioe.org...
>
>>>case 0x05: {la[--j] = la[j] / la[j+1]; break;}
>>
>>case 0x05:
>>{
>> la[j-1] = la[j] / la[j+1];
>> j--;
>> break;
>>}
>
> I.e., assuming LALR(1) and applying precedence, the above is:
> case 0x05:
> {
> --j;
> la[j] = la[j] / la[j+1];
> break;
> }
>
> It appears that DJGPP (GCC) works properly while OpenWatcom v1.3 fails. I'd
> guess that most K&R style compilers work.

The origial line invokes undefined behavior; anything the
compiler does is "proper".

--
Thomas M. Sommers -- tms(a)nj.net -- AB2SB

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Prev: masm linking from console
Next: NASM HelloWorld - DOS