I am going to ramble about quite a bit, so please bear with me...
I used Turbo Pascal for CP/M some and for DOS quite a bit. It is very simple as far as an integrated development environment (IDE) goes, but it is very functional and not that expensive to implement.
Borland went on to release Turbo C and Turbo BASIC along with Pascal wrapped in a fancier IDE, but what I really wanted at the time was Turbo Assembler with an IDE, even the simple early one. But I was not prepared to take on writing a MASM-compatible assembler to make my own. There were a few IDEs which used MASM or TASM to do the assembling, but the few I tried were rather clunky.
For a native environment on an 8-bitter, I strongly encourage adopting an interface similar to the early Turbo Pascal, version 3.x or earlier. It is essentially a full screen editor coupled to a small set of full-screen menus. Versions of Turbo Pascal 3.x are now free to download if you want to try it.
Believe it or not, my first attempt to write a compiler was for C. Whenever I begin learning a new processor architecture or programming language, I cannot resist implementing a simulator, assembler, compiler or interpreter to learn the deeper details. This was in 1984 when I decided I needed to learn C as that appeared to be the future of PC programming instead of Pascal. This was good old K&R C which was a bit simpler than the modern dialects. But I soon discovered that C was very difficult to parse compared to other languages. Probably because it was a bit of an accidental invention instead of being designed to be easy to parse - it was literally a high-level assembler for a DEC minicomputer. The project was soon abandoned.
After a few years of pretty intense career building, I had some free time to play with my 680x and CP/M machines. Compared to the PC world, they felt very primitive, largely because I did not have a hard drive on most of them. I wanted to be able to write and debug code for those machines on a PC and take the result to the 8-bitter for final testing. Hence embarking on building cross-development tools.
I later went on to create a series of cross-assemblers and compilers running on DOS to generate code for 8-bit microprocessors. 2024 may finally be the year I feel comfortable releasing these as usable products though I have been using the assemblers extensively for my own development work. They are not written in assembly language though, so there is little chance they can be successfully built to run natively on an 8-bit micro.
I was not a fool to write those entirely in assembly language. Sure, I had a library of subroutines written in assembly language which I called from compiled code - those were largely replaced later when I began migrating from DOS to 32-bit Windows. In the limited spare time I had, using only assembly language was not something I wanted to do.
Anyway, you will need to start somewhere.
A native assembler will probably be needed somewhere down the road, but it is not the easiest way to start.
Either try a subset of Pascal as that is a language designed to be relatively easy to parse or on old-school integer BASIC with line numbers as you can parse and compile it a line at a time. Emitting machine code directly allows you to run and test using only your SBC. Emitting assembly language is not as complex and in my opinion, more enjoyable, but you have to resort to cross-development until you build or acquire a native assembler. If you generate machine code directly, you will need a disassembler to look at the code you are generating.
Consider your first attempt to be a throwaway prototype. Do not let the perfect be the enemy of the good. Get something running. You will learn much in the process and gain the confidence to design and build your ultimate project.
If you know some microcomputing history, you might try implementing PL/M. It is a variant of PL/I, the mainframe programming language, developed by Gary Kildall to write system software for Intel microprocessors. He has a version written in FORTRAN to run on mainframes and minicomputers and he has a version to run on the Intel development system - I do not know whether that is in assembly language or FORTRAN.
Thomas Crosley wrote a PL/M subset compiler which runs natively on a 6800.
http://www.flexusergroup.com/flexusergr ... s/SPLM.pdfI have begun to disassemble and comment SPL/M, but have not gotten very far. Another member of the FLEX user community also made an attempt, but is similarly bogged down. Both of us have the goal of making it generate code for the 6809. It runs in 20K of memory and parts of it appear to be written in SPL/M.
You are not alone. If you have followed the adventures of David Given implementing CP/M for the 6502, he also wants native development tools.
viewtopic.php?f=2&t=7355He wrote an assembler in C; it is bigger than he would like and does not have many features, but it does satisfy his requirement of generating relocatable binaries for his operating system.