I downloaded the (what I think) original source code from two different sites. Here I found this:
LAB_2DB6
LDA Itempl ; get temporary integer low byte
LDY Itemph ; get temporary integer high byte
CPY #<Ram_base+1 ; compare with start of RAM+$100 high byte
BCC LAB_GMEM ; if too small go try again
It is the line starting with CPY that puzzles me, shouldn't it have been:
CPY #>Ram_base+1 ; compare with start of RAM+$100 high byte
???
Found a bug or am I wrong (or is it already known)?
Found a bug or am I wrong (or is it already known)?
Code: Select all
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Found a bug or am I wrong (or is it already known)?
It looks like you're right.
Ruud, to keep the white space, you need to put [code] and [/code] around the code. Also, replace tabs with spaces, since the forum software messes them up sometimes. You might need to copy and paste into a text editor to see what you're doing better, then copy from there and paste to the forum when you're happy with it. What you'll get is as shown here:
Ruud, to keep the white space, you need to put [code] and [/code] around the code. Also, replace tabs with spaces, since the forum software messes them up sometimes. You might need to copy and paste into a text editor to see what you're doing better, then copy from there and paste to the forum when you're happy with it. What you'll get is as shown here:
Code: Select all
LAB_2DB6
LDA Itempl ; get temporary integer low byte
LDY Itemph ; get temporary integer high byte
CPY #<Ram_base+1 ; compare with start of RAM+$100 high byte
BCC LAB_GMEM ; if too small go try again
It is the line starting with CPY that puzzles me, shouldn't it have been:
CPY #>Ram_base+1 ; compare with start of RAM+$100 high byte
???http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Found a bug or am I wrong (or is it already known)?
This section of the code is supposed to prevent the user from doing really stupid things:
1. Ram_top is configured smaller then Ram_base
2. The memory test does not find any memory above Ram_base
3. The user enters too little memory at the "Memory size ?" prompt
Since Ram_base should be page aligned the compare is with $01 and should always fall through which means the bug disables the sanity check.
I will fix the code in my patched up version with credit to Ruud.
1. Ram_top is configured smaller then Ram_base
2. The memory test does not find any memory above Ram_base
3. The user enters too little memory at the "Memory size ?" prompt
Since Ram_base should be page aligned the compare is with $01 and should always fall through which means the bug disables the sanity check.
I will fix the code in my patched up version with credit to Ruud.
6502 sources on GitHub: https://github.com/Klaus2m5
Re: Found a bug or am I wrong (or is it already known)?
GARTHWILSON wrote:
Ruud, to keep the white space, you need to put [code] and [/code] around the code. ....
Code: Select all
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org
Re: Found a bug or am I wrong (or is it already known)?
Klaus2m5 wrote:
I will fix the code in my patched up version with credit to Ruud.
Code: Select all
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org
Re: Found a bug or am I wrong (or is it already known)?
Fixed as proposed in my patched up version of EhBASIC 2.22p5 on GitHub.
https://github.com/Klaus2m5/6502_EhBASI ... er/patched
https://github.com/Klaus2m5/6502_EhBASI ... er/patched
6502 sources on GitHub: https://github.com/Klaus2m5