[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [N8VEM-S100:601] Re: S-100 68K CPU board status



On 12/27/2011 01:12 PM, lynchaj wrote:
> Hi,
> I think this manual has a decent procedure for doing a bootstrap for
> CP/M-68K
>
>
http://bitsavers.org/pdf/digitalResearch/cpm-68k/CPM-68K_System_Guide_Jan83.pdf
>
> Here are the actual source code files
>
> http://www.cpm.z80.de/download/cpm68k.zip
>
> I am thinking we can just use TUTOR 1.3 or a custom debug monitor to
> load the S records into RAM and then execute the binary image?
>
> Thanks and have a nice day!
>
> Andrew Lynch

Sounds reasonable to me.

The Alcyon C compiler build is going well, I ran into an interesting
thing in the assembler; ever see something like this before?:

    struct {
        short loword;
        short hiword;
    };
    struct {
        short swd1;
    };

    struct {
        char lobyte;
        char hibyte;
    };
    struct {
        char *ptrw2;
    };

That's it. anonymous structs, neither named or assigned to a variable,
but they are being used!!

In the code you'll have something like (watch closely now):

char* ptr;
...
...
x = ptr->loword;
...
...
ptr->lobyte = y;

...and things like this, so it's as if when you reference any variable
using the "->" or "." operator, the compiler seeks to try and align an
element matching from one of those anonymous structs to overlay the
variable. Exactly like a union, but without actually declaring anything.
Very, very, very strange, I don't recall anything like that in *any*
version of 'C' I've ever seen. In any case, obviously there is no chance
gcc is going to go for that, so I've had to declare those structs a
named union, and then declair each of the variables that do this
wierdness as an instance of that kind of union. And what's really odd
because I don't see any rationale for doing this, it could have just
been done with a union like I'm doing now....anyway...sorry don't mean
to get into a whole 'C' language discussion thing...

Anyway, the main compiler is building happily now, just a link error
because I have to build a lib to satisfy the link, and for that I need
the assembler. Also the c preprocessor is almost building.

So, suprisingly, it's the assembler that's giving the most grief so far,
but like I said I've got a handle on it now, I just have to track down
each instance of this wierdness and re-code it slightly.

--Mike

http://8bit.zapto.org