c source to something like cpm or dos?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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?

Re: c source to something like cpm or dos?



Quoted text here. Click to load it

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, snipped-for-privacy@ezcomm.com, Tel: 812-391-0895 */


Re: c source to something like cpm or dos?
     snipped-for-privacy@cs.indiana.edu (Ingo Cyliax) writes:
Quoted text here. Click to load it
                                       ^^^^^^^^^^^^^^^^^^^^

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
We've slightly trimmed the long signature. Click to see the full one.
Re: c source to something like cpm or dos?
Quoted text here. Click to load it

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


Re: c source to something like cpm or dos?


Quoted text here. Click to load it

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 http://www.cmpbooks.com/product/1043 .

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






Re: c source to something like cpm or dos?

Quoted text here. Click to load it

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

Ian
--
Ian Bell

Re: c source to something like cpm or dos?

Quoted text here. Click to load it
have
small
minix?
Quoted text here. Click to load it
compiler?
Quoted text here. Click to load it
maybe?

There is always FreeDOS - see http://www.FreeDOS.org - 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.

http://www.FreeRTOS.org





Re: c source to something like cpm or dos?

Quoted text here. Click to load it

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:

http://members.optushome.com.au/jekent /

http://www.flexusergroup.com /

Mike Harding


Re: c source to something like cpm or dos?
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......



Re: c source to something like cpm or dos?
Quoted text here. Click to load it

  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


Re: c source to something like cpm or dos?

Quoted text here. Click to load it

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

Quoted text here. Click to load it

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
We've slightly trimmed the long signature. Click to see the full one.
Re: c source to something like cpm or dos?

Quoted text here. Click to load it

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
  

Re: c source to something like cpm or dos?

Quoted text here. Click to load it


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?

Quoted text here. Click to load it
[...]

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 &
We've slightly trimmed the long signature. Click to see the full one.
Re: c source to something like cpm or dos?


Quoted text here. Click to load it

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! :)



Re: c source to something like cpm or dos?

Quoted text here. Click to load it

You might want to look at http://balloonboard.org/ very small footprint
currently going through a respin, but still worth playing with.

--
Paul Carpenter          | snipped-for-privacy@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/ PC Services
We've slightly trimmed the long signature. Click to see the full one.
Re: c source to something like cpm or dos?

Quoted text here. Click to load it

That's a great suggestion. Thanks!


Re: c source to something like cpm or dos?
Quoted text here. Click to load it

A Linksys router?

--

Tauno Voipio
tauno voipio (at) iki fi



Re: c source to something like cpm or dos?

Guy Macon <http://www.guymacon.com wrote in message

Quoted text here. Click to load it

Check out gumstix:  www.gumstix.com

It's about $120 or $140 with enclosure, based on the Intel XScale processor.

Bill




Re: c source to something like cpm or dos?

Quoted text here. Click to load it
....


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

        <http://www.linet.gr.jp/~mituiwa/h8/

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
<http://www.pcserviceselectronics.co.uk/ PC Services
We've slightly trimmed the long signature. Click to see the full one.
Re: c source to something like cpm or dos?
Quoted text here. Click to load it
=======================
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?

Site Timeline