Re: [Ql-Users] bug in String handling

2024-01-13 Thread pjw via Ql-Users
Well, whatever you guys choose to believe, please no one try to "fix" it as this behaviour appears to be consistent across the board - at least as far as JS, Minerva and SMSQ/E are concerned. If programmers keep their indices in order the issue should never arise anyway. Per On 13/01/2024 13:42

Re: [Ql-Users] bug in String handling

2024-01-13 Thread Dilwyn Jones via Ql-Users
I wonder if part of the reason that this arose is that some BASICs from that era just returned a null string "" if string slicing errors arose, without an error message and people remembered that? While that was probably convenient for the casual programmer, it must have made debugging difficult i

[Ql-Users] bug in String handling

2024-01-13 Thread Wolfgang Lenerz via Ql-Users
Norman Dunbar wrote: I still think that returning "" for a specific string slice from (a to a-1) is a bug! I tend to agree. x$ (a to b) where b is smaller than a should rise an error.The only way that would make any kind of sense to me would be if this returned the array contents in the re

Re: [Ql-Users] bug in String handling

2024-01-12 Thread Norman Dunbar via Ql-Users
Morning Jan, That matches with Jan Jones. Arrays index from zero, but simple strings from 1. Cheers, Norm. -- Author of "Arduino Software Internals" and "Arduino Interrupts". ___ QL-Users Mailing List

Re: [Ql-Users] bug in String handling

2024-01-12 Thread John Southern via Ql-Users
Could the reference be the SBASIC/SuperBASIC reference manual? That says When a string array is set up with DIM, each entry is set to a nul string (“”). The zero’th element of each string array contains the actual length of that string, for example: DIM a$(10,10): a$(1)='Hello': PRINT a$(1,0) will

Re: [Ql-Users] bug in String handling

2024-01-12 Thread Jan Bredenbeek via Ql-Users
On 12-01-2024 16:20, Norman Dunbar via Ql-Users wrote: If I remember correctly, all the way back to 1984-85, I'm almost certain that the supplied QL manual, in the large, heavy, A$ folder, mentioned that string lengths are indeed stored in a$(0)---or at least, can be accessed from there. C

Re: [Ql-Users] bug in String handling

2024-01-12 Thread Norman Dunbar via Ql-Users
On 08/01/2024 18:46, pjw via Ql-Users wrote: > 100 a$ = "1234567890" > 105 b$ = a$(4 to 3): REMark This works > 110 REMark c$ = a$(4 to 2): REMark This fails with an error. > 115 c$ = a$( to 0) : REMark no error returned > 120 c$ = a$(0):: REMark no error returned BUT ERROR IF QLIBERATED >

Re: [Ql-Users] bug in String handling

2024-01-12 Thread Norman Dunbar via Ql-Users
On 08/01/2024 16:51, Wolfgang Lenerz via Ql-Users wrote: Line 120 is due to the fast that strings are not 0 based index. So what would a$(0) be? Under SMSQ/E at least, print a$(0) in the above example would give "10" - which is the length of the string... Since this seems to be an unorthodox b

Re: [Ql-Users] bug in String handling

2024-01-08 Thread pjw via Ql-Users
Line 105: The construct a$(n to n - 1) represents the empty string (even when n = 1). Since it is replicated in JS, Minerva and SMSQ/E Im assuming it is by design. It also makes sense as there would be no other way to represent a string slice of null. Line 115: I guess a$( to 0) is read as a$(

[Ql-Users] bug in String handling

2024-01-08 Thread Wolfgang Lenerz via Ql-Users
Hi, Line 120 is due to the fast that strings are not 0 based index. So what would a$(0) be? Under SMSQ/E at least, print a$(0) in the above example would give "10" - which is the length of the string... Since this seems to be an unorthodox behaviour, it's no wonder Qlib balks at it. Line 1

[Ql-Users] bug in String handling

2024-01-08 Thread François Van Emelen via Ql-Users
Hi, Some other anomalies 100 a$ = "1234567890" 105 b$ = a$(4 to 3): REMark This works 110 REMark c$ = a$(4 to 2): REMark This fails with an error. 115 c$ = a$( to 0) : REMark  no error returned 120 c$ = a$(0):    : REMark  no error returned  BUT ERROR IF QLIBERATED 125 pause:stop The problem of

Re: [Ql-Users] bug in smsqmulator?

2017-02-12 Thread Wolf
Hi, ermm, I somehow forgot to link in the FLP driver into SMSQ/E. Until I have time to replace this on my normal SMSQmulator website, you can find the new SMSQE.zip file here: www.wlenerz.com/148temppjw25KL/SMSQE.zip (use copy & paste) Replace the existing file with the one in the zip file

Re: [Ql-Users] bug in smsqmulator?

2017-02-12 Thread Wolf
Thanks, I'll check that. Wolfgang On 11/02/2017 11:24, David Gilham wrote: setup smsqmulator version 2.22 SMSQE 3.29 I am using the java 7 version of smsqmulator on my linux thinkpad box i have a usb floppy drive. The problem is this I was going through some old ql formatted floppies and wan

Re: [Ql-Users] bug in smsqmulator?

2017-02-11 Thread desin
Am 11.02.2017 um 11:24 schrieb David Gilham: setup smsqmulator version 2.22 SMSQE 3.29 I am using the java 7 version of smsqmulator on my linux thinkpad box i have a usb floppy drive. The problem is this I was going through some old ql formatted floppies and wanted to check their contents making

[Ql-Users] bug in smsqmulator?

2017-02-11 Thread David Gilham
setup smsqmulator version 2.22 SMSQE 3.29 I am using the java 7 version of smsqmulator on my linux thinkpad box i have a usb floppy drive. The problem is this I was going through some old ql formatted floppies and wanted to check their contents making a disk image of the floppy disc was easy now i

Re: [Ql-Users] Bug in WM_ENAME

2012-05-02 Thread George Gwilt
On 2 May 2012, at 16:00, Norman Dunbar wrote: > > When I edit a string using this vector, and press ESC to terminate the edit, > I'm seeing zero in D0 instead of a positive number. D1.W is correctly set to > 27 for the ESC key. > > The docs state that: > > D0 negative is an error. > D0 zero

[Ql-Users] Bug in WM_ENAME

2012-05-02 Thread Norman Dunbar
I'm seeing a possible bug in WMAN's WM.ENAME. When I edit a string using this vector, and press ESC to terminate the edit, I'm seeing zero in D0 instead of a positive number. D1.W is correctly set to 27 for the ESC key. The docs state that: D0 negative is an error. D0 zero means ENTER presse

Re: [Ql-Users] Bug in French MG ROM

2011-03-12 Thread Ralf Reköndt
Rich Mellor wrote: Here's an interesting little challenge - according to "The Designer" program from Pyramide, there is a bug in the French MG ROM which it patches - see http://www.qlforum.co.uk/viewtopic.php?f=2&t=116 Anyone have any suggestions as to what this patch does? I just know abozt

[Ql-Users] Bug in French MG ROM

2011-03-12 Thread Rich Mellor
Here's an interesting little challenge - according to "The Designer" program from Pyramide, there is a bug in the French MG ROM which it patches - see http://www.qlforum.co.uk/viewtopic.php?f=2&t=116 Anyone have any suggestions as to what this patch does? -- Rich Mellor RWAP Services http://

Re: [ql-users] Bug?

2007-01-18 Thread George Gwilt
On 17 Jan 2007, at 19:19, Marcel Kilgus wrote: > > There were bugs in the past of QPC that vanished when using a debugger > (the instructions used by the debugger did by pure chance clear some > internal register a normal code execution did not). But that was over > 10 years ago, nowadays the QPC

Re: [ql-users] Bug?

2007-01-18 Thread Malcolm Lear
Hi Marcel I'm using 3.33. The problem now is that I can't reproduce the behavior. At the time clearing the data register before loading it with a word from memory solved the problem. However removing the moveq #0,dn does not bring back the problem. The compare operation also had an offset i.e.

Re: [ql-users] Bug?

2007-01-17 Thread Marcel Kilgus
George Gwilt wrote: > This works absolutely as expected on both a Q60 and QPC2 (latest > version). That is, the branch does go to "equal". I assume you used > QMON or whatever to step through the program else you can't see what > is happening. There were bugs in the past of QPC that vanished w

Re: [ql-users] Bug?

2007-01-17 Thread George Gwilt
On 17 Jan 2007, at 10:17, Malcolm Lear wrote: > > Is this normal behavior for a 68K processor. I'm doing a word > comparison > between a memory location and a data register. It seems that data > in the > most significant word of the register is effecting the result. In the > example > below t

Re: [ql-users] Bug?

2007-01-17 Thread Marcel Kilgus
Malcolm Lear wrote: > start move.l #$,d0 > lea test,a4 > cmp.w(a4),d0 > beq.sequal > bra.snotequal > test dc.w 0 > equal nop > notequal nop I have no idea what assembler you use, but just by looking at the code le

Re: [ql-users] Bug?

2007-01-17 Thread Malcolm Lear
Thanks Wolfgang, I'll investigate further. The code I've got problems with is obviously slightly more complex, but a group of comparisons that failed were fixed by clearing the data register before loading with a word from memory. Malcolm Wolfgang Lenerz wrote: >On 17 Jan 2007 at 10:17, Malco

Re: [ql-users] Bug?

2007-01-17 Thread Laurence Reeves
Malcolm Lear wrote: > Hi > > Is this normal behavior for a 68K processor. I'm doing a word comparison > between a memory location and a data register. It seems that data in the > most significant word of the register is effecting the result. In the > example > below the test ends up at notequal. U

Re: [ql-users] Bug?

2007-01-17 Thread Wolfgang Lenerz
On 17 Jan 2007 at 10:17, Malcolm Lear wrote: > Hi > > Is this normal behavior for a 68K processor. Hmm, here (QPC) the test works OK, it branches to the equal label as expected, the Z flag is set by the CMP. Wolfgang   www.scp-paulet-lenerz.com ___

[ql-users] Bug?

2007-01-17 Thread Malcolm Lear
Hi Is this normal behavior for a 68K processor. I'm doing a word comparison between a memory location and a data register. It seems that data in the most significant word of the register is effecting the result. In the example below the test ends up at notequal. Unfortunately I've not got access

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-10-04 Thread Norman
George wrote: > > The point about all this is that the opcodes $32 up to $FF should > produce the addresses $FF32(A6,A4.L) to $FFFE(A6,A4.L), or -206 > (A6,A4.L) to -2(A6,A4.L) by whatever means. If SMSQ/E sets $32 to > $0032 instead of $FF32 then it is definitely wrong! > Hi George, SMSQ/

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-25 Thread George Gwilt
On 24 Sep 2006, at 12:03, Marcel Kilgus wrote: > George Gwilt wrote: >> Dickens says that codes $31 to $FF are extended to a negative word >> $FF31 to $ when used to determine the storage address. Apart from >> the fact that $31 does not seem to be allowed, Pennel and Dickens are >> saying th

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-24 Thread Marcel Kilgus
George Gwilt wrote: > Dickens says that codes $31 to $FF are extended to a negative word > $FF31 to $ when used to determine the storage address. Apart from > the fact that $31 does not seem to be allowed, Pennel and Dickens are > saying the same thing in different ways, Pennel is in fact corre

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-24 Thread George Gwilt
On 22 Sep 2006, at 08:14, [EMAIL PROTECTED] wrote: > Ok, A6,A1 was a typo, I meant A4 - apologies. On the other hand, my > QDOS Companion (Pennell) has the load/save parameters as $32 to $ff > and not $ff31 to $ as you state. > > I went on a doc hunt last night and Dickens has the negati

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ? (OT ramblings about left and right)

2006-09-23 Thread Jeremy Taffel
Marcel, I don't disagree. The reason for the posting was that the previous posting had misrepresented the contents of the Wikipedia article. I don't think that I made any claims about the veracity of the article, or of the theory. However, the evidence from Sweden quoted in that article was not

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ? (OT ramblings about left and right)

2006-09-23 Thread Marcel Kilgus
Jeremy Taffel wrote: > According to Wikipedia, the story about Napoleon is legend with no > basis in fact. I did look at Wikipedia. But I just consider it a "somewhat" reliable source and in those cases I still always fact check with other sources. And Wikipedia is pretty much the only source havi

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ? (OT ramblings about left and right)

2006-09-23 Thread Malcolm Cadman
In message <[EMAIL PROTECTED]>, Jeremy Taffel <[EMAIL PROTECTED]> writes >Jeremy (still lurking, rarely QLing these days) What, not even QL emulating ... :-) -- Malcolm Cadman ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ? (OT ramblings about left and right)

2006-09-23 Thread Jeremy Taffel
According to Wikipedia, the story about Napoleon is legend with no basis in fact. However, what is interesting is that road traffic statistics seem to suggest that driving on the left is safer. The theory is that the preponderance of right eye dominance results in statistically faster reaction

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Marcel Kilgus
[EMAIL PROTECTED] wrote: > You'd probably be surprised at just how much time is involved in > writing an article, never mind a series. As somebody who usually fact-checks every single sentence in every single eMail I write, maniacally really, I'm not the least bit surprised, no ;-) >> Well, histo

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
Marcel, > Well, I myself have never used this and only read up on it after your > questions... Much obliged - thanks ! > The idea of my own column commenting on all the things I read that are > wrong or at least not-quite-right has already crossed my mind, but > then I'm lazy and currently don'

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Marcel Kilgus
[EMAIL PROTECTED] wrote: > It's not exactly documented anywhere really. Well not until QL Toady > prints my next article where I have a good rant on the subject :o) Well, I myself have never used this and only read up on it after your questions... > Mind you, it allows someone more knowlegable th

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread David Tubbs
Sorry, Norm, Twas under that Subject I read Tony's French tour ! D At 12:18 22/09/2006 +0100, you wrote: >Thanks. >(I think !!!) > >Cheers, >norman. > >[EMAIL PROTECTED] wrote: > > At 10:41 22/09/2006 +0100, you wrote: > > > > Probably, I can see no connection ! > > > > > > -- > > >

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
Hi Marcel, > Yes, but nobody tells you that the data area is just for FP data. True, but if I was setting up an area of storage I'd be sure (myself) to keep my FP stuff well away from my other stuff purely because it's possible for the FP stuff to wander all over my other stuiff if I get the off

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Marcel Kilgus
[EMAIL PROTECTED] wrote: > Not with the LOAD/SAVE op code as far as I can see, they always take > 6 bytes from the A1 stack and load back 6 bytes. There is no way > that I can see (using the maths package) to load and save a word for > example. Yes, but nobody tells you that the data area is just

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
[EMAIL PROTECTED] wrote: > You must visit Minerve. We probably will - I'll be driving and MrsD will be navigating in her usual manner - "you should have turned left back there" ! (Only kidding) > and wine around there is pronounced "Ving" with a hard end G - > important to know (8-)#

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
Thanks. (I think !!!) Cheers, norman. [EMAIL PROTECTED] wrote: > At 10:41 22/09/2006 +0100, you wrote: > > Probably, I can see no connection ! > > > -- ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread David Tubbs
At 10:41 22/09/2006 +0100, you wrote: Probably, I can see no connection ! -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.7/454 - Release Date: 21/09/2006 ___ QL-Users Mailing List

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Tony Firshman
[EMAIL PROTECTED] wrote: I'm looking forward to hearing back from you all :o) > > PS. I'm off to France next week, so any replies after today will be delayed > in being read. I've got to drive on the wrong side of the road for a week - > that should be fun. If you are anywhere around Marseill

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > >>Not only that, but codes from -5 through to -1 will overwrite data at > >>the top of your A4 stack. > > Ignore that. I'm a pillock. I've got my mental stack upside down again :o( > Actually, I may not be a pillok after all ! Correct me

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
[EMAIL PROTECTED] wrote: Morning Derek, > > Many years ago I wrote many Hyperbolic function based on The Advanced > QL User Guide, by Dickens. All seemed to work fine. > Funny that. I was just wondering if anyone had ever done that sort of thing when I was looking at Dickens last night. Spooky

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
[EMAIL PROTECTED] wrote: >>Not only that, but codes from -5 through to -1 will overwrite data at >>the top of your A4 stack. Ignore that. I'm a pillock. I've got my mental stack upside down again :o( Cheers, Norman. ___ QL-Users Mailing List http://w

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Derek Stewart
Hi Norman, Many years ago I wrote many Hyperbolic function based on The Advanced QL User Guide, by Dickens. All seemed to work fine. The functions in the book only described the obvious functions, I needed some other fuctions for a mechanical engineeriong problem I did on the QL in Superbasic, fo

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-22 Thread Norman
Morning Marcel, Wolfgang, Thanks for your replies. > Nope, that's where you differ with the documentation. First, the > variable area is (A6,A4), typo I guess, and second, the opcodes $FF31 > to $ are for load/save, not $32 to $FF. Yes, the latter DO work, > but it seems that's more an undocu

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-21 Thread Wolfgang Lenerz
On 21 Sep 2006 at 18:36, Marcel Kilgus wrote: >(...) > Well, you can store other things in the variable area too, so it makes > sense that you can address every individual word there. Just to add to that some small explanation: the load/save ops (and yes, there are negively indexed) are just t

Re: [ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-21 Thread Marcel Kilgus
[EMAIL PROTECTED] wrote: > I was explaining the SAVE and LOAD op codes for RI_EXEC and RI_EXECB > where the top of stack floating point value is saved to a variables > area at (A6,A1.L) or a new TOS is created by loading back from said > area. The op codes for save are even in the range $32 to $FF

[ql-users] Bug in SMSQ 312 maybe - or am I barking ?

2006-09-21 Thread Norman
Afternoon all. I'm puzzled again. I'm writing an article on the use of the maths packags in QDOSMSQ for our esteemed QL Toady magazine and I've hit a small problem that, for the life of me, I can't figure out. I was explaining the SAVE and LOAD op codes for RI_EXEC and RI_EXECB where the top o

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread James Hunkins
ptember 04, 2006 5:34 PM Subject: Re: [ql-users] bug in qlib_h C68 support file > Hi Guys, > > Three things were fooling me: > > 1) I was calling this using a C function so I 'assumed' that it was > converting to C strings > > 2) when I grab the string, if under 3

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Dave Walker
unkins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 04, 2006 5:34 PM Subject: Re: [ql-users] bug in qlib_h C68 support file > Hi Guys, > > Three things were fooling me: > > 1) I was calling this using a C function so I 'assumed' that it wa

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread James Hunkins
> floppy > based systems. Those using hard disk based systems are better off > using the > commented versions > > Dave > . > - Original Message - > From: "James Hunkins" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 04,

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Marcel Kilgus
Rich Mellor wrote: > However, ideally the minimum surely has to be 36+5?? (rounded up to 42) or > does the library have a distinct device name string also?? No, the device name is not part of the directory/file name. Marcel ___ QL-Users Mailing List ht

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Rich Mellor
On Mon, 04 Sep 2006 15:49:18 +0100, Marcel Kilgus <[EMAIL PROTECTED]> wrote: > James Hunkins wrote: >> I think that I found a bug in the qlib_h include file used by C68. >> Here are the details: >> >> In the 'qdirect' structure, the member 'd_name' is defined as: >> char d_name[36]; > >

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Rich Mellor
On Mon, 04 Sep 2006 15:18:59 +0100, James Hunkins <[EMAIL PROTECTED]> wrote: > Guys, > > I think that I found a bug in the qlib_h include file used by C68. > Here are the details: > > In the 'qdirect' structure, the member 'd_name' is defined as: > char d_name[36]; > > This works as long a

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Dave Walker
floppy based systems. Those using hard disk based systems are better off using the commented versions Dave . - Original Message - From: "James Hunkins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 04, 2006 3:18 PM Subject: [ql-users] bug in q

Re: [ql-users] bug in qlib_h C68 support file

2006-09-04 Thread Marcel Kilgus
James Hunkins wrote: > I think that I found a bug in the qlib_h include file used by C68. > Here are the details: > > In the 'qdirect' structure, the member 'd_name' is defined as: > char d_name[36]; Your misconception is that d_name holds a null terminated string, which it doesn't. The le

[ql-users] bug in qlib_h C68 support file

2006-09-04 Thread James Hunkins
Guys, I think that I found a bug in the qlib_h include file used by C68. Here are the details: In the 'qdirect' structure, the member 'd_name' is defined as: char d_name[36]; This works as long as the directory/file name is 35 or fewer characters and holds a properly terminated C st