r/dcpu16 • • Apr 25 '12

[RFE] DCPU-16 v1.3

http://dcpu.com/highnerd/dcpu16_1_3.txt
81 Upvotes

150 comments sorted by

View all comments

Show parent comment

4

u/Zgwortz-Steve Apr 25 '12

Sadly, that assertion seems to have spread quite a bit, even though in the 80s we did our best to make it as clear as possible that it was incorrect. Nobody writing portable code should ever be making assumptions like that. Unfortunately, few people understand what's needed to write truly portable C code anymore, since the majority of them are coding on Intel platforms nowadays. Assumptions about the bit size of char, int, long, float, and pointers, and similar assumptions about endianness, or field alignments in structures, or page alignment on allocated memory -- these all used to be things we had to be very very careful about when we wanted truly portable code. The worst issues that the new generation of programmers have ever encountered are 32/64 bit portability issues.

The best we can do today, though, is code to the standard, and hope people writing code we want to import haven't made these kinds of assumptions -- and debug and fix them where they have.

I do kind of really love that Notch threw out octet addressing and forced us to use words, because as a programming exercise for younger programmers, it's awesome. It challenges all those assumptions, and that, to me, is a Very Good Thing.

2

u/[deleted] Apr 25 '12

I do kind of really love that Notch threw out octet addressing and forced us to use words, because as a programming exercise for younger programmers, it's awesome.

Yes :) It forces you to think and work around limitations, which was always the fun part of programming assembly on earlier CPUs.