c source to something like cpm or dos?

CPM and MSDOS ran just fine on small 8 bit machines... I'd like to have something similar on an 8 bitter with a some flash mem for a disk drive. I have a bunch of hc11s with 32k ram and 32k rom around... bet that would run a small editor, file system, cmd line c compiler. Serial port. Self targeted development system. Any pointers to a cpm or dos like file system in c? minix? Nice small c source to an editor? Now how about c source to an hc11 c compiler? That might be trickier. At least an assembler. Something up on simtel maybe?

Reply to
BobGardner
Loading thread data ...

sounds like a nice project, but I don't know of anything that is C based. There was a bunch of 6809 based stuff, but much of it will be in assembler. CP/M (like most OSes of the day) was written in assembler and ran on 8080, so it's not going to port to hc11. Flex used to run on 6809. It had hooks so you could write your own console, disk drivers for it. Forth is a nice platform for self- hosted development system, I bet there are some 6809 versions around.

I believe GCC has hc11 target, but it will not be able to host itself.

See ya, -ingo

--
/* Ingo Cyliax, cyliax@ezcomm.com, Tel: 812-391-0895 */
Reply to
Ingo Cyliax

You could port the original CP/M. It's about 8K of well- commented 8080 assembly. Or you could port FreeDOS, which is written in C. See

formatting link

I wouldn't do either, though. I would instead start looking at various RTOSs.

Reply to
Guy Macon

Why would he want to do that? Sounds like he wants a desktop.

Ian

--
Ian Bell
Reply to
Ian Bell

have

small

minix?

compiler?

maybe?

There is always FreeDOS - see

formatting link
- you get the source code to an MS DOS compatible'ish operating system - but it relies on Intel platform and BIOS so porting it to HC11 would be huge job. Could be a starting point for you though.

GCC has an HC11 port.

Richard.

formatting link

Reply to
Richard

Sounds like Flex may be what you're after. I have no idea if it's in the public domain these days? Try these two sites for starters:

formatting link

formatting link

Mike Harding

Reply to
Mike Harding

Thanks for the replies... the idea was a portable development environment for an hc11, 8051,avr, or whatever. The hw would be: cpu, serial port, flash card, and as much ram as possible. SW components (in c) would be: fat file system, editor, assembler, c compiler for tgt cpu, some kind of shell/command line.

This seemed easier to do on an hc11 than on an avr, because even tho avr can expand ram with paging, hc11 can have program code in ram as well. Lets have a few more ideas about portable components as decribed above......

Reply to
BobGardner

Why would you want to do this - just to use some legacy PCB's ? A non-cross development system has some appeal, but not really at the HC11 node : simply not worth the effort.

Where this DOES start to make sense, would be with an eZ80 - there you have a huge base of SW to trawl through from CP/M - I am surprised Zilog have not tried to seed this type of activity more. The original TurboPascal was an impressive 39KB, for Compiler/Editor and Source level Debug !

ARM would be another candidate, but the legacy OS base for this is much smaller, and more ASIC locked.

-jg

Reply to
Jim Granville

And you think you're going to fit all that in 32K of ROM?!?!?!

It seems just as impossible on an hc11 as itd oes on an avr.

--
Grant Edwards                   grante             Yow!  Where do your SOCKS
                                  at               go when you lose them in
                               visi.com            th' WASHER?
Reply to
Grant Edwards

Since the configuration included a flash card as a mass storage device and 32 KiB of RAM, what is the problem ?

The editor, assembler and C-compiler can be on the flash and loaded into RAM as needed. A few decades ago time sharing systems with comparable amount of memory served a large number of interactive users doing program development in assembler and Fortran, while the system also served as a remote job entry (card reader, synchronous serial communication and printer spooling) system for a remote large system running as a background service concurrently with the time sharing system.

A modern system with 32 KiB of RAM and 32 KiB of ROM and a few hundred megabytes of flash could easily implement similar functionality. For instance a two pass assembly could be implemented in the following way:

  1. Load the assembler first pass into RAM
  2. Reading one source line at the time, assembly the line, build symbol table in RAM and write intermediate code into flash
  3. Load second pass of the assembler into RAM, but keeping the symbol table in RAM
  4. Read one token at the time from the intermediate code file, resolve forward branches from symbol table and write final code to flash

Since only one source line is processed at a time, there is no direct limit of the program size supported. Only the number of forward referenced labels and global symbols are limited by the available RAM for the symbol table.

Paul

Reply to
Paul Keinanen

^^^^^^^^^^^^^^^^^^^^

Are you sure? I seem to recall that CP/M was allegedly written in some kind of highlevel language (not C though, could be PL/M). Later there was CP/M 68K which at least looked as if it was done in C. Its porting manual suggested to write the BIOS in C as well.

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com
Reply to
Robert Kaiser

You're right. I didn't see that you were going to use a CF for a filesystem. If you want to write somethign along the lines of OS-9 or CP/M with a flash card for a filesysetm, it's quite possible.

Why not use a cheap 32-bit CPU that can run Linux?

Even if you do want to write your on OS, Filesystem, editor, assembler, compiler, linker and so on, it'll be a lot easier with somethign that has more than a 64K address space. I was using CP/M 25 years ago, and people were alreadying having to jump through hoops with overlays and whatnot to get around the limitations of 16-bit address spaces. There are 32-bit parts under $4 with 24-bit address spaces and free development tools,

4X as much flash, etc. Why beat your head against a wall by picking something like an HC11 or an AVR?
[...]

True. Let us know how it works.

If I were going to do it, I'd use an ARM or an H8.

--
Grant Edwards                   grante             Yow!  -- Hello,
                                  at               POLICE? I"ve got ABBOTT &
                               visi.com            COSTELLO here on suspicion
                                                   of HIGHWAY ROBBERY!!
Reply to
Grant Edwards

Good point.

What would be the minimum system that can run Linux? I haven't looked for one, but I suspect that someone already makes a minimum-cost SBC that runs Linux already. If they haven't, then I will! :)

Reply to
Guy Macon

======================= Oh come on Grant. The rom is just to boot the os into ram from the flash disk, and hold the runtime library, just like the old days. You remember them dont you?

Reply to
BobGardner

Of course. Somehow I missed the reference to a CF card.

--
Grant Edwards                   grante             Yow!  I just bought
                                  at               FLATBUSH from MICKEY
                               visi.com            MANTLE!
Reply to
Grant Edwards

....

Somebody did that a few years ago as demos on H8 in fact various H8 platforms including an IDE interface, one for USB, one for Ethernet. If still active the link is

Some of the code for command parser was a bit spaghetti, but he gives circuits and code that may be a starter for ideas. I would suggest building the code from the ground up though.

-- Paul Carpenter | snipped-for-privacy@pcserviceselectronics.co.uk PC Services GNU H8 & mailing list info For those web sites you hate

Reply to
Paul Carpenter

You might want to look at

formatting link
very small footprint currently going through a respin, but still worth playing with.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

IIRC, Digital Research (the folks of CP/M) used their own compiler for PL/I - not the crippled Intel dialect called PL/M.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

A Linksys router?

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

That's a great suggestion. Thanks!

Reply to
Guy Macon

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.