• Please review our updated Terms and Rules here

What are you guys using for retroprogramming?

Dwight Elvey

Veteran Member
Joined
Jun 21, 2003
Messages
4,804
Location
Santa Cruz
Interesting, I've never had much experience with Forth but I looked into it after reading your post and I'm quite intrigued. I may start messing around with it a bit.

Win32Forth comes with a nice text editor that has a project manager. I don't use that part but others find it useful. It also has a way of finding the Win32Forth source code of any of the Win32Forth words as well as any word that you've compiled. Sometimes with deferred words it is more useful to see what was actually used. There is a 'see' decompiler.
As others will tell you, it has a steep learning curve to properly use it. Many of the bad habits you've learned in other languages will make poor Forth. Parameters are passed on the stack and there are a lot of stack manipulations words. If your righting good code, you won't be using more than OVER, DUP, SWAP and DROP. You must always think in terms of the steps you would use to do something, unlike most other languages that are out of order. Good Forth code reads like sentences, not formulas. This makes things easier to debug and understand.
I had a friend write some Hamming code. When he turned it into his manager that didn't read Forth, he returned it and asked where the code was, because the stuff he'd gotten was just the definition of what to do. When you get to that point, you'll know you are writing good Forth code.
Forth can amplify bad code to be even worse. Years ago, I helped a friend out at Seagate. It was a servo track writer written in Forth that wasn't working. It took me several hours to understand where in the code it was messed up, even after I knew what it was physically doing wrong in the servo writer. The fellow had written code like it was translated from BASIC.
One thing you'll rarely see in Forth implementations and that is any form of type checking. This is good and bad. Still, you are a big boy now. To make up for this Forth makes it easy for you to test your code for correctness as you write it. You can then easily tune it to the application your working on. If you add an integer to a floating point it will make a garage number. Forth almost forces you to test as you write. After using it for a while, you find that you already know what to test for. If you're using something like a counter that starts with an offset, as you write the code you'll start thinking about the exception cases to test for. That is the best time to test that piece of code, not after you've written 20 more pages of code. The language won't be in the way if you want to subtract 41h from the ASCII letter A. No more having to cast it with intent or, worse, having the language do it without telling you.
Dwight
 

lowen

Veteran Member
Joined
Jan 16, 2014
Messages
1,520
Location
Western North Carolina, USA
What hardware are you targeting?
What kind of compiler/interpreter software do you use?
Do you program on old-school systems themselves or do you use a modern editor?
And (hopefully without starting a flame war) what language(s)?

Z280.
ZXCC on CentOS 7, using the PRE280 Z280 preprocessor and the SLR180 assembler.
I use vi on Linux. If I want to get GUI there are other options such as gedit, but I'm most productive with vi running in one terminal and a command line in another terminal with which to build.
Z280 assembler, so far. Once I can get UZI280 bootstrapped, C, of course, but that will be built with the patched HiTech C with the Z280 libraries.
 

MarsMan2020

Experienced Member
Joined
Dec 19, 2013
Messages
188
Location
Hawthorne, CA
What do people here typically use for CP/M (8080 and Z80) programming? Both on a modern development system and on vintage systems?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,246
Location
Pacific Northwest, USA
On the rare occasions that I still do it, it's my 22NICE emulator running plain old native CP/M tools in the MSDOS environemnt provided by DOSEMU under Linux. Allows me to use Linux, DOS and CP/M tools.

But I'm probably very atypical in this.
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,246
Location
Pacific Northwest, USA
That's the nice thing about a fast contemporary system--what used to take minutes now completes about as fast as you can hit carriage return. And you're still using original CP/M tools.

Reminds me of working on Unix on a VAX being told by a friend from Cray that he didn't bother with makefiles--the whole thing compiled in a couple of minutes.
 

mangis

Experienced Member
Joined
May 20, 2014
Messages
64
Location
Finland
Notepad++ for coding.

DosBox-X for compiling and immediate testing, within that:
MASM 6.11
Quickbasic 7.1
Turbo C 2.01

For (game) content I've used Photoshop CC and Tiled.
I've been surprised to find that Tiled is a pretty decent editor for pixel graphics if very specific dithering and patterns (like in text mode) are required. Just make a tileset with the patterns + color combinations and you're set to make some text-mode graphics with precalced gradients.
 

Scali

Veteran Member
Joined
Dec 13, 2014
Messages
2,024
Location
The Netherlands
That's the nice thing about a fast contemporary system--what used to take minutes now completes about as fast as you can hit carriage return. And you're still using original CP/M tools.

Yes, that's the fun part about using something like DOSBox or WinUAE: if you set them to their fastest speed and lots of memory, they can run the same old tools much faster than any real machine ever did.
 

Damaniel

New Member
Joined
Oct 2, 2014
Messages
7
I mainly use DJGPP since I target 386+, but I actually use a much older version (circa 2001) that I scraped from the obsolete section DJ Delorie's site a few months ago. That way, I could use an early release of Allegro and C++ without megabyte+ sized executables and insane compile times. I've also worked off and on on a CGA 'text-mode graphics' Arkanoid clone in Turbo Pascal, which is pretty decent for real-mode DOS programming.

I do most of my development in DOSBox but I also test on a 486-spec PCEm PC and (occasionally) on a real 486 PC.
 
Last edited:

cchaven

Experienced Member
Joined
Jul 31, 2003
Messages
169
Location
Roanoke, VA
Since it came out, I've used Power Basic 2.0 from Spectra Publishing on my various DOS machines. Since finding backups of my old source a few months ago I've been dabbling in it again and plan on getting back into it with Virtual Box on my Linux laptop.

When MS Visual Basic came out I got it to get into Windows programming but after realizing it lacked the file I/O that I did so much of, I stopped using it after doing one program with it. It's still installed on WFW 3.11 but I've not actually done anything more with it.

At one point I'd planned on learning C, specifically to do some graphics and telecom type stuff and have TurboC and the various books for it but stopped to concentrate on other things I was already working on in Power Basic at the time, including some telecom stuff.
 

CP/M User

Veteran Member
Joined
May 2, 2003
Messages
2,986
Location
Back of Burke (Guday!), Australia
I have an Amstrad CPC system (which I grew up with), that I put a lot of my coding efforts into, but seem to get little reward or help if I have coding problems. Cross-coding has become the norm for that system as it belongs to a group of Z80-based systems, where using a PC based Cross-compiler can easily make commercial quality program. Though I only have simple ideas for my programs and use the old languages which were found on that computer system. Though I'm a lone coder as well, not sure if I would work well in a team effort environment. The languages I tend to use for it are the Internal BASIC (Locomotive BASIC), Hisoft Pascal 4t, sometimes Turbo Pascal 3 if I have Pascal problems so others can look at the problem, I've dabbled in Small-C, typed in a game which was coded in BCPL, recently was looking at Phrozen C, which is a revamp of Small-C to suit some of the Amstrad's features such as it's extra 64k and extra ROM programs, the example I typed in produced an executable Binary (after Assembling it), of 1Kb, which seemed very good. Because I code on an emulator I tend to use it's inbuilt Assembler as well, though it is compatible with one of the popular ROM based Assemblers (MAXAM).
 

Raven

Veteran Member
Joined
Mar 7, 2009
Messages
2,752
Location
DE, USA..
I mostly target 486/Pentium as that's my area-of-most-nostalgia. I try to actually do the coding on the target hardware, personally. I realize this slows things down quite a bit but it can be a lot more enjoyable at the same time.

Platforms:
- Targeting Win3x or DOS I use my Presario 425 that runs WFW 3.11 on top of DOS 7.10.
- Targeting Win9x I use my Toshiba Libretto 110ct or my 300Mhz custom build Tillamook box running 98SE.

Delphi 1.0 (Win3x) - I work on my own branch of Calmira (3.4), though my website's been down for a while so nobody can get the build I have out at the moment - need to fix that!
OpenWatcom (Win3x & DOS)
DJGPP (DOS, when I need to compile something Unix-style with make files and the like)
JWasm (DOS)
MSVC 1.52c (Win3x)
MSVC 6 (Win9x)

I also keep these around, though I have yet to use them for anything really:
VB 1.0 (DOS) - Easy text GUIs on DOS? Yes please.
VB 3 (Win3x) - Worth noting this one is way lighter weight than 4 since it predates a lot of bloaty features like OLE, so it's preferable to use 3 unless you need the features of 4.
VB 4 (Win3x) - See above.

I don't have a great editor for use on DOS, I normally just use EDIT.COM (if anyone has a recommendation that'd be cool). I'm planning to write my own at some point, because why not?

OS programming I do on a modern machine in x86 ASM and C99, and I use SCITE as my editor with a custom built GCC crosscompiler for the C and NASM for the ASM (and BAT files as a stand-in for "make" - I've never understood Unix-style make environment stuff, makes my head hurt). For this I test with various emulators to make sure it works all over:
- QEMU (my go-to at the moment)
- Bochs (used to be my primary one)
- Fake86 (I'd use this way more if it had 386 support, as my OS is 32-bit, but it's great for testing the bootloader up to the 32-bit code)
- DOSBox (ykhwong build usually, has networking, Glide, and some other nice features)
- VirtualBox (annoying for this as it won't deal with raw binary files properly for FDD/HDD images)
- VMWare Player (same as above)

Also worth noting that Japheth's stuff makes it pretty easy to code something that will run on MS-DOS all the way up through modern 64-bit Windows as long as you're careful about what DLLs/methods you're calling. Unfortunately his site went down sometime in the past few years, but it's all on archive.org (https://web.archive.org/web/20100430013226/http://www.japheth.de:80/) - albeit very... very slow loading on there for some reason.

You could actually run DOSBox under DOS with Japheth's tools, which would let you do things like OS development sans-reboots or sandboxed application testing (dealing with interrupts and direct hardware access, that wouldn't be the worst idea if you run DOS on a modern machine that you also use for other things). It'd crawl like hell for any serious software to run in, but I imagine for testing regular text-mode applications it'd be just fine even on a 486/Pentium (haven't tried, though - I really should, it sounds fun).
 
Last edited:

CP/M User

Veteran Member
Joined
May 2, 2003
Messages
2,986
Location
Back of Burke (Guday!), Australia
I don't have a great editor for use on DOS, I normally just use EDIT.COM (if anyone has a recommendation that'd be cool). I'm planning to write my own at some point, because why not?

I used to use one call Tiny Editor or T as it was shortened to. A similar editor (if not the same one) came with OS/2, as the name suggests, it's Tiny about 9kb I think, but could handle large files. It also had a impressive help file, though it's more command driven compared to EDIT, despite it having a few Function Key Options at the bottom, it has a Command Line just above it. From memory you could also load multiple files and flick between them if you needed to.
 

Icheb88

New Member
Joined
Jun 10, 2018
Messages
1
I am a late bloomer to programming. I want to try my hand at making a simple recipe database program for DOS or windows 3.1 on my Tandy. What language and editor would you suggest I use?
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,276
What languages are you comfortable with? What languages are available for that platform?

I started on BASIC which had support for fixed length records in files. Interpreted BASIC was slow, but the speed of the floppy drive was a much bigger problem. ;-0
 

Trixter

Veteran Member
Joined
Aug 31, 2006
Messages
7,333
Location
Chicagoland, Illinois, USA
BASIC is the correct choice if you're starting from ground zero. In fact, "a simple recipe database program" is the most common beginner BASIC example I saw in the early 1980s in books and magazines.
 

CP/M User

Veteran Member
Joined
May 2, 2003
Messages
2,986
Location
Back of Burke (Guday!), Australia
^^ I suppose some of the PC based BASICs have a tendency of looking more like Pascal, though I'm unsure what BASIC has when it comes to defining a type definition record, it doesn't mean that it makes it impossible to code in BASIC, though for writing a Database program, Pascal can define those records a bit clearer. Though as I said, I'm not sure what BASIC has in that regard :D
 

Elminster

Member
Joined
May 28, 2018
Messages
22
Location
UK
Acorn 8bit 6502 Hardware (Electron, BBC Micro, Master) & SWTPC 6800

I do use the Enhance Basic Editor on BBC but once the program gets huge I usually edit them on the Mac using vi & BBEDIT. For 2 reasons, editing becomes a pain and the editor on the target platform uses up memory, and I can run out of memory when I still have 'loads' left. Usually BC BASIC with a bit of ASM 6502 where it needs a bit more oomph.

SWTPC 6800 still getting to grips with, I dont even try to edit code on here currently. BASIC and ASM 6800 (although ASM 6800 is learning in progress).
 

KitWax6

New Member
Joined
Jun 6, 2018
Messages
5
for MS-DOS:
GW-BASIC 2.2 (It came with my AT&T 6300), Turbo Pascal 3.0 (an oldie, but goodie), Microsoft C 5.1, and Turbo C++ 1.01.
My preferred compiler of choice is Turbo C++ 1.0, since it can compile both C code and C++ code.

for Linux:
C, Java, and Python.
My preferred compiler of choice is C.

-- Kit
 
Top