FAQ  •  Register  •  Login

This is weird - just plain won't run the code?

<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Thu Sep 05, 2013 7:16 pm

This is weird - just plain won't run the code?

Input code:

  Code:
BORDER 2
CLS
Print "Temp File"


(Originally it was just the one print line).

Out put file: https://dl.dropboxusercontent.com/u/490 ... fChaos.zip

This just crashes the Spectrum.

Build settings: zxb -T -B -a "LawOfChaos.bas"

C:\zxb --version
zxb 1.3.0-s1022

I haven't compiled anything up in a while. But...it's odd it seems to be making a broken result?
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Sep 06, 2013 9:37 am

Re: This is weird - just plain won't run the code?

I can't reproduce the crash.
This runs ok. In the emulator. Are you running it on a real speccy? Which model?
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Fri Sep 06, 2013 7:42 pm

Re: This is weird - just plain won't run the code?

I'm going to file this under "weird"

It works for me now as well. I don't actually own a real spectrum ;) I was, and still am, running it under spectaculator 8.0. It crashed last night each time. Today, it behaves....

Now I'm really baffled.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Sep 06, 2013 8:08 pm

Re: This is weird - just plain won't run the code?

britlion wrote:I'm going to file this under "weird"

It works for me now as well. I don't actually own a real spectrum ;) I was, and still am, running it under spectaculator 8.0. It crashed last night each time. Today, it behaves....

Now I'm really baffled.

Could it be you were running it on a non standard mode (e.g. +3, +2A, another clone)??
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Sat Sep 07, 2013 9:45 am

Re: This is weird - just plain won't run the code?

boriel wrote:
britlion wrote:I'm going to file this under "weird"

It works for me now as well. I don't actually own a real spectrum ;) I was, and still am, running it under spectaculator 8.0. It crashed last night each time. Today, it behaves....

Now I'm really baffled.

Could it be you were running it on a non standard mode (e.g. +3, +2A, another clone)??


Maybe. Not recoverable now. But it's a thought - perhaps it was left in an odd mode!
<<

Darkstar

Posts: 81

Joined: Tue Mar 29, 2011 1:05 am

Post Mon Sep 16, 2013 11:07 am

Re: This is weird - just plain won't run the code?

britlion wrote:
boriel wrote:
britlion wrote:I'm going to file this under "weird"

It works for me now as well. I don't actually own a real spectrum ;) I was, and still am, running it under spectaculator 8.0. It crashed last night each time. Today, it behaves....

Now I'm really baffled.

Could it be you were running it on a non standard mode (e.g. +3, +2A, another clone)??


Maybe. Not recoverable now. But it's a thought - perhaps it was left in an odd mode!


I have had this problem and as it turns out the compiler did an "push hl" in the start up code just after the beginning RAND USR address or ORG, do not know why but there was no reason for it to be there and that is all I know.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Mon Sep 16, 2013 11:40 am

Re: This is weird - just plain won't run the code?

Darkstar wrote:I have had this problem and as it turns out the compiler did an "push hl" in the start up code just after the beginning RAND USR address or ORG, do not know why but there was no reason for it to be there and that is all I know.

If you can reproduce this, please tell me the steps. This will allow me to fix it. Which version were you using?
Usually an extra push hl means a bug in the optimizer (not removing it).
<<

Darkstar

Posts: 81

Joined: Tue Mar 29, 2011 1:05 am

Post Mon Sep 16, 2013 1:12 pm

Re: This is weird - just plain won't run the code?

boriel wrote:
Darkstar wrote:I have had this problem and as it turns out the compiler did an "push hl" in the start up code just after the beginning RAND USR address or ORG, do not know why but there was no reason for it to be there and that is all I know.

If you can reproduce this, please tell me the steps. This will allow me to fix it. Which version were you using?
Usually an extra push hl means a bug in the optimizer (not removing it).


It was a while ago so I do not remember the -O level and I have not even tried to reproduce it. It was the second (after DI) or third instruction, very close to the beginning. Always kept crashing on me even though I recompiled until I found that extra "push hl" instruction and I thought "stupid stupid stupid, what is that doing there?" When I deleted both the TAP file I think it was and the ASM file and then recompiled then finally I got rid of that pesky "push hl" instruction. I do not think I changed the -O level. I have not had this bug since and I do not know how to reproduce it.

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO