Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Summary of stuff not working [V1.2.4]
#16
The comparisons all worked perfectly.

Do tell - what was the bug? Was it just one?

I can't seem to reproduce the CHR(var) problem right now. I DID have some issues that were cleared up by uninstalling and reinstalling at one point - it's possible some of the .py files got corrupted or something. I'm not quite sure what happened. So, as well as some real bugs, I may have had some other problems.

I've updated the top post so anyone coming by can see what's happening. I hope it's clear!

You haven't mentioned the tutorial stuff and the wiki updates on reserved words. Think that sort of thing is useful? I'm hoping so. The "faster code" thing was really some hints for people new to compiled spectrum basic. I could see some beginners needing some hand holding. I know we all hate to do documentation, so I'm trying to help out where I can.

Right now the two issues I pointed out at the bottom to do with error messages are some of the biggest problems. It's very hard to track down where code is not correct because "unexpected end of file" doesn't give a clue where - and if you mistype a variable name, it can be very strange tracking down why it's not working!
#17
britlion Wrote:Yeah, you've mentioned SVN. It's a tool I've heard about in coding circles once or twice, but never used. I'm not using the .zip version. I tried an msi install, and then thought I could use the .zip to upgrade...but apparently I can't. It has completely different files in it!

So I'll either need a tutorial in how to get SVN versioning working or an MSI version I'm afraid :-)
You must install Python, and then call zxbc.py file to compile your program.
I do use the msi version myself.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
#18
britlion Wrote:You haven't mentioned the tutorial stuff and the wiki updates on reserved words. Think that sort of thing is useful? I'm hoping so. The "faster code" thing was really some hints for people new to compiled spectrum basic. I could see some beginners needing some hand holding. I know we all hate to do documentation, so I'm trying to help out where I can.
The wiki updates are great! Sorry I didn't mention it before (I think it should go in another thread). On the other hand, I was about to propose to include some of your code into the compiler (band, bor, bxor), because I was considering to put these as BASIC keywords:

myVar band 0xFF
and also
myVar & 0xFF
Yes (C-like operators too). So you can write &, |, ! or And/or/not. Unfortunately, bXor in C uses ^ char, which is power() operator in ZX Spectrum BASIC so we sould consider another symbol.
#19
I cheated quite a bit with the binary functions (using fastcall as a 16 bit). I think I may have a handle on how stdCall works, but it would be nice to know what is on the stack when a call to a function happens.

There's quite a lot on the stack, and it seems to be replicated with the registers (that is, for something like LONG,LONG - DEHL has the first one, and the stack has both.) There's also some number on the stack ahead of the return address and I can't work out what it's for.

As for Xor - I'm not sure what to shortcut for that. Obviously bXor is the way to go in text. We could totally confuse people and use % so they think it's MOD There aren't many left that wouldn't be confusing. ! is factorial, ? is usually used as a ternary if/then/else (or even a synonym for print, which I never understood). You've used @ as a pointer for the memory address, and # is tied up with the preprocessor - unless it can do double duty.

~ ?

Smile



How good is the compiler at not including runtimes it doesn't need at the moment?
#20
britlion Wrote:~ ?
I'm supporting this. In PureBasic this is also used for BXOR.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
#21
LCD Wrote:
britlion Wrote:~ ?
I'm supporting this. In PureBasic this is also used for BXOR.

Ok, I agree. ~ symbol will be used as an alias for BXOR.
#22
New bug!

LCD reported SHL and SHR as failing for Integer types. It works for byte, uByte, long and uLong.

Code:
CLS
DIM a as <type>
a=4
print a SHL 1
print a SHR 1

This will not compile if you put <type> as uInteger or Integer.
#23
britlion Wrote:New bug!

LCD reported SHL and SHR as failing for Integer types. It works for byte, uByte, long and uLong.

Code:
CLS
DIM a as <type>
a=4
print a SHL 1
print a SHR 1

This will not compile if you put <type> as uInteger or Integer.
I've already fixed if (15 min ago! :lol: ) Read here <!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/viewtopic.php?f=14&t=388#p868">viewtopic.php?f=14&t=388#p868</a><!-- l -->

Idea Idea: For new bugs I think it's better to start a new thread on this forum (Bug Reports) so new comers will see it immediately as reported.
#24
boriel Wrote:Idea Idea: For new bugs I think it's better to start a new thread on this forum (Bug Reports) so new comers will see it immediately as reported.

Agreed! Let's CLOSE this thread then.
#25
The CHR$ crashes and memory corruption are probably related to the memory corruption bug recently fixed: memory corruption affected strings (INKEY$, CHR$). I'm sure this explains the strange CHR$ behavior you experimented before and why you can't reproduce it now.


Forum Jump:


Users browsing this thread: 2 Guest(s)