Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi Tech C 3.09 hangs #48

Closed
tsupplis opened this issue Dec 23, 2017 · 12 comments
Closed

Hi Tech C 3.09 hangs #48

tsupplis opened this issue Dec 23, 2017 · 12 comments

Comments

@tsupplis
Copy link

While testing a variety of programs, I met one issue. The compiler run under runcpm hangs. It seems to be associated to the C.COM program chaining the various compilation steps. I did not go far enough to figure out what triggers the failure.
the same compiler works properly in a simh environment and a couple of other emulators.
the programs generated with it work perfectly under it.

@drawkula
Copy link
Contributor

drawkula commented Dec 23, 2017

With commit e7bc3b3 - same problem here too:

C>c hello.c
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE
█

I noticed this some days ago but thought I had screwed up my runcpm install.

submit and/or seaching binaries on A0: doesn't work too.

C>user 1
C>submit myhi
SUBMIT?

C>exit    
EXIT?

C>dir
C: CR       SUB : ECHO     C   : ECHO     COM : ENVIRON
C: MANDELBR C   : MANDELBR COM : MANDELBR SUB : MYHI     C  
C: MYHI     COM : MYHI     SUB : TE       BKP
C>█

submit and exit are on A0:. The prompt isn't changing to C1 after the user 1 command but dir correctly shows the contents of C1:.


Going back to commit 17ea6fc fixes this. The prompt changes after user 1, submit works and c myhi.c does not hang.

C>user 1
C1>type myhi.c
#include "stdio.h"
main()
{
        printf("Hi, RunCPM!\n");
}

C1>type myhi.sub
; create myhi.com
c myhi.c
myhi
;

C1>submit myhi

RunCPM Version 2.8 (CP/M 2.2 64K)

C1$; CREATE MYHI.COM
C1$C MYHI.C
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE

RunCPM Version 2.8 (CP/M 2.2 64K)

C1$MYHI
Hi, RunCPM!

RunCPM Version 2.8 (CP/M 2.2 64K)

C1$;
C1>█

@tsupplis
Copy link
Author

Super, Thank's, this gives us a first regression date....we just need to inspect all the changes from then. when the error occurs, it seems that the system is indeed in the disk calls with weird FCB addresses and content...
The only relevant changes made on the 26th are touching OpenFile, WriteSeq and ReadSeq and one of the constants MaxCR.
Will test by elimination tomorrow.

@tsupplis
Copy link
Author

tsupplis commented Dec 23, 2017

a6ca0a6#diff-441fac67a0c8e278dbe6999fe1474964
quick confirmation, rolling back disk.h fixes it.

@MockbaTheBorg
Copy link
Owner

These are the changes I made to get ADV.com working. So I need to double check and make sure they don't become mutually exclusive.
Someone please get me a link do download the same HiTech C 3.9 and I will take a look.

Thanks!

@drawkula
Copy link
Contributor

https://schorn.ch/altair_6.php has Hi-Tech-C in aztechitechc.zip.

Hi-Tech-C from that disk image as ZIP: hi-tech-c-v3.09.zip

@tsupplis
Copy link
Author

ok. so reducing even further the problem. the removal of the zeroing of ex,s1,s2,cr in the OpenFile function is what is creating the issue.

@MockbaTheBorg
Copy link
Owner

But I believe that was what fixed ADV.com... need to test again ... but I am almost sure.

@MockbaTheBorg
Copy link
Owner

HI there ... I have re-added just the zeroing of s1 and s2. It seems to have fixed HiTech C without breaking ADV. So I will leave it like this, but won't close this issue for now.
I would like you guys to test them and also other stuff, and let me know if there are any other issues.
Then I will close here.

Merry Christmas and Happy New Year to everyone. See you in 2018 :).

@tsupplis
Copy link
Author

Super, Thank you so much. Testing it early tomorrow. will put results in.
And best wishes for the new year to you too....

@tsupplis
Copy link
Author

Preliminary test is a win... c compiler works a treat. will carry on testing tomorrow.

@drawkula
Copy link
Contributor

I still have some of the problems with commit a3cae38 (posix variant) like already mentioned above:

CP/M 2.2 Emulator v2.9 by Marcelo Dantas
      Build Dec 29 2017 - 08:51:01
       with Lua scripting support
-----------------------------------------
CCP: CCP-DR.60K  CCP Address: 0xe400

RunCPM Version 2.9 (CP/M 2.2 60K)

A>user 1
A>dir
no file

user switches but the prompt does not change.

A>c:
C>dir
C: CR       SUB : ECHO     C   : ECHO     COM : ENVIRON
C: MANDELBR C   : MANDELBR COM : MANDELBR SUB : MYHI     C  
C: MYHI     COM : MYHI     SUB : TE       BKP

This is C1:.

C>exit
EXIT?

C>submit myhi
SUBMIT?

exit and submit are on A0: and should be runnable from C1:.

C>user 0
C>c hello.c
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE

RunCPM Version 2.9 (CP/M 2.2 60K)

Ok. c.com does not hang.

C>a:
A>dir exit*.*
A: EXIT     ASM : EXIT     COM : EXIT     SUB : EXIT     Z80
A>dir sub*.*
A: SUBMIT   COM : SUBMITD  COM

Proof that exit and submit really are on A0:.

@MockbaTheBorg
Copy link
Owner

I believe I changed the default CCP to DR's when I was testing ADV (to make sure I was on 100% DR 2.2 compatible mode). This "strange" behavior you are seeing should be the standard (unpatched) DR 2.2 behavior.
Go to globals.h and change the CCP on line 25:
//#define CCP_DR
#define CCP_CCPZ
CCPZ has the behavior you want: Fallback to user0 on A: if the requested executable is not found locally.
(You can try the others just for fun)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants