[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xtrs z80



On 16 October 2013 00:37, Glenn English <ghe@slsware.com> wrote:
>
> On Oct 15, 2013, at 9:17 PM, Stan Hoeppner wrote:
>
>> I don't know if C was even available for the TRS-80 back then.  If it
>> was it didn't cross my RADAR.
>
> It might well have been. One of my first jobs in computing was to write an evaluation of 3 C compilers on a Xerox CP/M box. I don't remember what they were called, but I think they cost $$.
>
>> Aww, don't make it so easy.  Have them do it in assembler. :)
>
> Keep in mind that C is nothing but a collection of macros for PDP-11 assembly language :-)
>


Hey guys,

Assembler! LOL! That is to break their legs! No, not so cruel. :)

Just to LINK a c program too much crazy. Considering how the language
evolved, to use, for example,

int main(argc, argv)
int argc;
char **argv;

Wow! That is really strange!

I also learned BASIC in one of these machines, more precisely a MODEL
III. How I loved it! I called it Elephant (all my computers have
names). I really regret that I sold it. Im looking for a good price to
buy one again. Even if it did not work, I can install a raspberry PI
or a arduino intel Galileo running xtrs emulator. But that is for the
future! Now I'm happy to remember the fun in my notebook.

I learned C some years later, in a PC-XT, in 1989 probably. Never
heard of a C compiler for TRS-80. But after so many years programming
C I thought I would give it a try. And I want to tell the fresh news:
I just succeed!

I've found this "Misosys C: a complete K&R C system " at
http://tim-mann.org/misosys.html

Very nice! You also need to download MRAS assembler.

What a JOB to compile a simple program!! :) LOL

But I DID ! Ahahaha! (Bellow the whole sequence for your delight)

Now I want to program another one using "printf" to see if the link is ok.

Very funny. I think that little game I'm writing to learn debian
packaging, I'll include a port to TRS-80. (Actually, its a old game,
written originally on a TRS-80, in BASIC, that I lost the code, and I
rewrote it in C based on some other BASIC versions I have for PC-XT
and 486. Weird to move it back to TRS-80)


Cheers,
Beco.

PS. Here the C compilation process:

BTW, I renamed the "JOB CONTROL LANGUAGE" called MC/JCL that do all
the stuff bellow to GCC/JCL ! Now I feel more at home.

Just do:
>DO GCC (N=program)
And it runs all the programs.

But here I run one at time:
L is the text editor Lazy Writer
If you know a better one, please tell me. But I kind of like this one.
Reminds me 'vi'.

LDOS Ready
> L
int main()
{
putchar('A');
return 0;
}
s PUTCHAR/CCC*

LDOS Ready
> MCP PUTCHAR/CCC:1
MISOSYS C Preprocessor - Version 1.6a - DOS 5.1.x
Copyright 1985,86 Riclin Computer Products. All rights reserved

13968 bytes free

Including PUTCHAR/CCC

Output PUTCHAR/TOK - Preprocessed file

LDOS Ready
>MC1 PUTCHAR:1
MISOSYS C Compiler - Pass 1 - Version 1.6a - DOS 5.1.x
Copyright 1985, 1986 MISOSYS, INC. All rights reserved

5245 bytes free

...
main() {...}.
No error(s) found

LDOS Ready
>MC2 PUTCHAR:1
MISOSYS C Compiler - Pass 2 - Version 1.6a - DOS 5.1.x
Copyright 1985, 1986 MISOSYS, INC. All rights reserved

4917 bytes free

...
main() {...}.

Output: PUTCHAR/ASM

LDOS Ready
>MRAS MC +I=PUTCHAR +O=PUTCHAR -NL
MRAS 1.0a - Copyright (c) 1985 MISOSYS, Inc.,
All rights reserved.

Including MC
Including PUTCHAR
including MCMACS
000f is the transfer address
00000 Total errors
26263 Free space

Output: PUTCHAR/REL - Relocatable Object File

LDOS Ready
> MLINK PUTCHAR:1 +N=PUTCHAR:1 -E

MLINK 1.2 - Copyright (c) 1985 MISOSYS, Inc.,
All rights reserved.
L <5200-5BF4 09F5>
32933 Free space

Output: PUTCHAR/CMD

LDOS Ready
>PUTCHAR
A
LDOS Ready
>

Yaaay! :D



-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


Reply to: