Products > Vintage Computing
Experiments with C in DOS
Ampera:
I've recently adopted the C language after being D-O-N-E with Java. I can only take so much ass backwardness until my head explodes.
Programming is more of a hobby for me, so my progress is often slow, but I thought I could show what I have been doing.
My machine of choice to program was my 486-DX4-100 machine, which is perfect for this sort of thing, but for portability (physically not technologically, the idea of porting this has left my mind long ago) I have installed Windows 98SE on a Prescott-era Toshiba Satellite laptop, which was a bit new for it, but it worked out.
My IDE of choice is Borland Turbo-C because of it's free status, and helpful compiler-specific features like dedicated pseudo-variables for accessing CPU registers.
Now I do plan to do more modern stuff, and I did a bit of a crash course in SDL2 which I plan to pick up, but I want to have some fun while I get used to C.
So what have I done? Something quite simple and if you have DOSBox you can try it yourself. It's a test to see if I can write text to screen memory using a pointer.
Here's the code in pastebin form:
https://pastebin.com/aKWgfjPL
To try this out, you're going to need Turbo C, which is available for free (it's in the public domain) from a quick google search of Archive.org.
Load the file as a .C and compile it without any strings attached. You may even be able to just type it in using the website based DOSBox and compile it there.
I would include an executable, but the issue is that it's currently on my 486, and I'd have to get that, and I am too American to be bothered with that tbh. If people really want I'll get off my arse and do it.
Here's a couple screenshots of what it does instead:
Now as you may be able to tell from the code, that's supposed to be a checkerboard pattern, but I don't have it offset right in order to do that, but I just would need to offset the characters that are stuck into the array by one to fix that.
So I hope this was at least somewhat interesting. I shall post again of my next feat. I can say I have been experimenting with graphics modes and have gotten some mild results from that.
james_s:
I remember drooling over a 486 DX4-100 back in the day. If I'd had $10,000 I could have got one along with a color printer, that was my dream PC at the time. Unfortunately due to budget constraints I had a 16MHz 386sx.
paulca:
Reminds me of doing things like:
POKE 20, 20
On the Spectrum which either
* did nothing
* locked up
* reset
* Made pretty wall paper - write that one down.
Ampera:
Ah, BASIC POKEing. That's always fun (not)
Also if you think a DX4 is nuts, I also have a 200mhz Pentium Pro with a Mach64/GX, Voodoo 1, 128MB RAM, SB32 (CT:3670), and some other neet stuff.
james_s:
I have a Pentium Pro somewhere too, I think it's in the shed at my mom's house. That was a long way off from being developed when I was drooling over 486's.
Navigation
[0] Message Index
[#] Next page
Go to full version