Better HN
topnewbestaskshowjobs
Log inSign up

qx89l4

63 karma · joined Apr 21, 2015 (11y ago) · 9 submissions

Submissions

comment 7y ago · link · parent

Awesome project, congrats!

comment 7y ago · link · parent

I "discovered" DOS 25 years ago, not sure what's your point?

comment 7y ago · link · parent

Hadn't heard of them, thanks for the links!

comment 7y ago · link · parent

Good point, OpenWatcom is obviously miles ahead of Turbo C, but it's also much more complex. I tinkered with it for a while, and ended up using the latter for its simplicity.

DOSBox can be easily installed on any system, you can save the entire C: in a git repo and it'll probably keep working in any number of years from now :)

Meanwhile, OWC doesn't have packages in popular Linux distros, only a custom binary installer, and on MacOS it doesn't even have that.

comment 7y ago · link · parent

Targeting 8086-level of instructions was actually my first idea. It wasn't possible with gcc/clang, but Turbo C is freeware these days, so... ;) In case you're interested, see https://github.com/luke8086/nf/

comment 7y ago · link · parent

I'm not sure if defaulting to 32-bit instructions would still allow calling BIOS, but good point!

In this case the design goal was to show the easiest way to jump into C and start building the actual application, so I just tried to avoid any trickery (even enabling the A20 line)

comment 7y ago · link · parent

I feel your pain, so sorry that you still need to support the .code16gcc hack! My first approach was actually to avoid GCC/clang altogether, and use Turbo C instead. It came with its own set of problems, but the output was much more predictable. In case you're interested, you can find the code at https://github.com/luke8086/nf

8.

Show HN: A simple way to write standalone C programs for i386(github.com ↗)

147 points · by qx89l4 · 7y ago · 34 comments

comment 7y ago · link · parent

> Also seems he has just self-published a book (as of July 27):

> Do you would like more details on the inner workings? This program is fully commented in my new book Programming Boot Sector Games and you'll also find a 8086/8088 crash course!

I created one such game [1] a few years ago and had plenty of fun. I'm pretty shocked to see an actual book published specifically about this niche topic. I haven't read it, but I hope it gets some recognition, because IMO toying with 8086 is one of the best ways to get into bare-metal coding.

[1] https://github.com/qx89l4/utris