Aztec CZ80 Version 1.06d CP/M 80 C128 Etc. Cross Compiler configured for XP

Started by BillBuckels, March 31, 2008, 10:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BillBuckels

Aztec C Vers. 1.06D Z80  (C) 1982 1983 1984 by Manx Software Systems

You may have seen some of my recent messages in here on my Aztec C Website and the Windows XP Build Environments and Cross-Compilers for the C64 and Apple //e. What I haven't talked about until now is some of the other Aztec-C cross-compilers that I am in the process of putting online complete with samples and all the rest of it.

Of interest to C128 folks who also have a Windows XP Machine and who like to write C language programs will undoubtedly be the MS-DOS Z80 cross-compiler that I have almost ready to go. I expect to have this available for download sometime around the second week in April.

Booting CP/M Plus in the WinVICE Emulator



Today among other activities I decided that I should probably get CP/M 80 up and running on x128.exe so I grabbed a CP/M d64 and using ctools I added a small Aztec CZ80 .com program to the diskimage and presto! everything worked just fine except for that silly screen40 which cut-off the rest of my message (see below).

I had been working with Lee's version of Simeon Cran's MyZ80 so I had been spoiled with 80 column mode for quite some time now. The other thing I did note was just how comparatively slow everything runs on the x128.

Exempl.c - a small test program


main()
{
char buf[80];
printf("please enter your name: ");
gets(buf);
printf("hello, %s, welcome to the growing community of Aztec C users\n", buf);
}
   

The MAKEFILE


# ------------------------------------------------------------
# makefile(C) Copyright Bill Buckels 2008. All rights reserved.
# ------------------------------------------------------------
CC=ccz
AS=as80
LN=ln80
PRG=exmpl

$(PRG).com: $(PRG).rel
             copy $(CROOT)lib\c.lib .
$(LN) -o $(PRG).com $(PRG).rel -lc
del $(PRG).rel
del c.lib

$(PRG).rel: $(PRG).c
      $(CC) -a $(PRG).c
      $(AS) $(PRG).asm
      del $(PRG).asm





Additional Notes

I will add more details about how this all works. And one more thing. I will be combining a native mode version of this same compiler with the XP cross-compiler for any die-hard that wants to suffer through compiling in an emulator. I prefer XP thanks.

I also have the CP/M 86 stuff almost ready to go but that's not a topic I'll discuss in here, because CBM didn't get into the x86 market until long after all that was dead.

More to come on this soon.

BillBuckels

Running CP/M in x128.exe (WinVICE Emulator) in 80 Column Mode

There were two things wrong with my initial testing of the AztceC C CP/M 80 Example Program in the X128 emulator and I should mention them so nobody reading this thread gets the impression that x128.exe doesn't work reasonably quickly and in 80 column mode.



To boot a CP/M 80 diskimage in x128.exe follow these steps:

1 - Make sure you have VICE installed

http://www.viceteam.org/

2 - Get the cp/m system disk here

http://www.zimmers.net/anonftp/pub/cbm/demodisks/c128/

3 - start up x128

4 - Under Options -> Maximum speed, set to 200%

5 - Attach the cpm disk in drive 8

6 - Do a soft reset

7 - When the "Booting CP/M Plus" appears at the top of the screen, hit F7 to go into 80 col mode. The 80 column mode screen in x128 will then become the primary display.

8 - once booted up, type "screen40 off" (this is optional)

9 - Save as a snapshot so you dont have to repeat next time you want to boot into cpm

Note: CP/M 80 is available in both d64 and d81 diskimages.

If you are using a d81 set x128.exe to use a 1581 drive before attaching the diskimage. Under Settings -> drive settings -> Drive #8 model, select 1581.

http://www.zimmers.net/anonftp/pub/cbm/demodisks/c128/cpm.622-5002336.d81.gz
   
Thanks to yakumo9275 http://armchairarcade.com/neo/node/1530


BillBuckels

CTOOLS

Quote from: redrumloa on April 04, 2008, 10:54 PM
Neat! Keep us informed!

Well OK but there is an important piece missing when using x128 and that is the lack of support for maintaining d64 and d81 CP/M diskimages in VICE in general. the c1541 utility just doesn't cut-it! (at least I couldn't get it to work... maybe someone else knows a cryptic secret that I have missed) What you really need for that is ctools:

http://www.clipshop.ca/Aztec/ctools04.zip

Before I get into that in more detail, there is another important piece also mssing in my instructions for using CP/M in the x128 emulator. You must always select Settings->Drive Settings->Drive 9 if you are running a second diskimage. In CP/M you probably will want to do exactly that and use a work disk (data disk, scratch disk) in Drive 9 and keep your CP/M boot disk in Drive 8.


Booting with the 1581   



To get the most out of CP/M in x128 you probably will want to boot with a d81 in drive 8. Whether you do or whether you don't it is also doable to use a d64 in drive 9 no matter what you boot with.


The Boot Disk




The Work Disk (Data Disk, Scratch Disk)



Using CTOOLS to Make a d64 Demo Disk of our CP/M 80 programs

And here's how we use ctools to make these little d64's with our code on them (compiled in the comfort of Windows XP if we like... BUT I plan on providing a native mode CP/M 80 Aztec C compiler on a diskimage that will work in x128, in case someone is using vice in some environment that won't run the Aztec-C Messy-DOS-stuff. I suppose they can just set their x128 into warp mode, not even bother with the cross-compiler and do like the c128 cp/m guys did in the old days...)

Anyway... preferring to do things the easy way, here's an example batch file that uses ctools to make the demo disk that I am bundling with Aztec CZ80 soon to be available... very soon...


@echo off
if "%CLIB%" == "" goto END
if exist azsample.d64 del azsample.d64
call cformat -1 azsample.d64
call ctools azsample.d64 p exmpl.com
call ctools azsample.d64 p keybrd.com
call ctools azsample.d64 p ov.com
call ctools azsample.d64 p ov1.ovr
call ctools azsample.d64 p ov2.ovr
call ctools azsample.d64 p find.com
call ctools azsample.d64 p textfile.com
:END
   

One last thing... with all this talk about drive 8 and drive 9, just remember to type "A:" for drive 8 and "B:" for drive 9 when you are using CP/M and you want to change drives. And oh yes, if you want to cat a file to the crt remember it's "type" followed by the name of the file and not cat like in 'nix.