f



Z80 Programmers' Challenge

Hi there!

Been having a look at the SE Basic source, which I haven't touched for
nearly 12 months. No time to work on it since I'm going to New Zealand,
but I did get as far as adding new TOKENS to Basic. So here's an appeal.
Can someone please extract the TRACE command from the TK95 ROM, the ON
ERROR command from the TS2068 ROM, and the RENUM command from the Spanish
128 Editor ROM. I'd like to include them in SE Basic, but I don't have the
time or resources to do this myself. I have already added EDIT, DELETE and
SYSTEM commands (the last of which sets up additional hardware). It would
also be helpful if someone could write a printer driver for the ZX Printer
that operates externally from the Spectrum ROM. I want to relocate the
printer driver code outside the normal ROM area so I can reclaim the 256
byte buffer for other purposes. I suggest looking at Geoff Wearmouth's Sea
Change ROM for inspiration. All of the available info is at:
http://www.srcf.ucam.org/~pak21/spectrum/roms.html

I've reactivated the email account in the header so you can contact me by
email to let me know how you're getting on.

Surely someone can do this over the next 12 months and save me a heap of
work? One further request; please comment your source code - makes life so
much easier.

Cheers!

-Andrew

-Andrew
0
aoweninoz (369)
11/16/2003 11:04:52 AM
comp.sys.sinclair 6096 articles. 0 followers. Post Follow

32 Replies
1040 Views

Similar Articles

[PageSpeed] 15

In article <aoweninoz-1611031104520001@dial81-135-57-147.in-
addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes
>Been having a look at the SE Basic source, which I haven't touched for
>nearly 12 months. No time to work on it since I'm going to New Zealand,
Bon voyage mon summer-chasing ami.

>Can someone please extract the TRACE command from the TK95 ROM, the ON
>ERROR command from the TS2068 ROM, and the RENUM command from the Spanish
>128 Editor ROM. 
Your challenge would be more appealing if you described how a trace or
on error would work.  Just ripping someone else's code is close to
plagiarism whereas clean-room code, even if the end result is similar to 
something else, is likely to be more robust and better documented. I'm 
currently extracting a renumber from one of my own programs so that will
be available commented next year when the New Zealand winters drive you
back to these shores.  

> It would
>also be helpful if someone could write a printer driver for the ZX Printer
>that operates externally from the Spectrum ROM. I want to relocate the
>printer driver code outside the normal ROM area so I can reclaim the 256
>byte buffer for other purposes. I suggest looking at Geoff Wearmouth's Sea
>Change ROM for inspiration. 
I assume you are keeping the 256 bytes and not sliding the system
variables down, as I did, as the latter makes it impractical for
compatibility. That's why the Sea-Change ROM is just a novelty concept
computer. It's actually pretty easy as most of the work is already done.
The only trouble is that PR_CC would have to be in the pointer group of
system variables and that is too great a change. I opted for a lateral
thought alternative that allows up to 13 simultaneous buffers instead.

Speaking of plagiarism, I referred to an online Java course two weeks
ago which is developing nicely and if anyone has any sense it should
eventually be sold as a book. There are two more lectures there now with
exercises and model answers are made available after about a fortnight.

If you liked the world of taxation, temperature conversion and chess
pieces then it's all up there in Birmingham if a little more
sophisticated now.

The elusive first exercise has appeared and its not Java but just an
introduction to the computers. You have to make a personal Web Page and
do a Google Search using your own name and accredit an interesting quote
properly. He warns his students - 

"The last part, is an important part of the exercise! If you quote a web
page without saying where the page is, that can sometimes be plagiarism
- passing off somebody else's work as your own -, which is a serious
offence academically. So we want you to get used to this idea."

I've recently made some amendments to the Sea Change ROM. These mainly
involve space saving at the expense of speed. I discovered most of these
while documenting the CIRCLE and ARC drawing routines in the main
Spectrum file. All heady but fascinating stuff.

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/17/2003 9:23:21 PM
���/On Mon, 17 Nov 2003 21:23:21 +0000,�(�) Geoff Wearmouth 
<geoff@wearmouth.demon.co.uk> ������/wrote:

> In article <aoweninoz-1611031104520001@dial81-135-57-147.in-
> addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes
>> Been having a look at the SE Basic source, which I haven't touched for
>> nearly 12 months. No time to work on it since I'm going to New Zealand,
> Bon voyage mon summer-chasing ami.
>
>> Can someone please extract the TRACE command from the TK95 ROM, the ON
>> ERROR command from the TS2068 ROM, and the RENUM command from the 
>> Spanish
>> 128 Editor ROM.
> Your challenge would be more appealing if you described how a trace or
> on error would work.  Just ripping someone else's code is close to
> plagiarism whereas clean-room code, even if the end result is similar to
> something else, is likely to be more robust and better documented. I'm
> currently extracting a renumber from one of my own programs so that will
> be available commented next year when the New Zealand winters drive you
> back to these shores.


Hmmm not totally... The TK95 ROM was a blatant Rip-off anyway so 
"stealing" from the thieves can't be so bad now can it? :-D
Seriously though I kinda agree with you but seeing how the TK95 is long 
dead it's not really that big of a deal... especially if people don't 
really have the time (or energy anymore ;-) to provide something like that 
 from scratch.

On another note, I think that the Zip compiler has features like that and 
probably S.N.G could be kind enough to provide the code (He's a great guy 
anyway!)

Phoebus


-- 
Visit the QL-FAQ at: <http://www.dokos-gr.net/ql/faq/> (Still uploading 
stuff!)
Visit the uQLX-win32 homepage at: <http://www.dokos-gr.net/ql/uqlx.html>
Visit the uQLX-mac home page at:<http://www.dokos-gr.net/ql/uqlxmac.html>
For mail reply to: ql PUNKT css AT dokos MINUS gr DOT net
0
11/17/2003 9:37:21 PM
In article <oprysw0povwur7eh@news.verizon.net>,
Sinclair QL a.k.a. P.D <do.not.bother.me@spammer.net> wrote:
>
>Hmmm not totally... The TK95 ROM was a blatant Rip-off anyway so 
>"stealing" from the thieves can't be so bad now can it? :-D

Since when have two wrongs made a right?

(Yes, I see the smiley!)

Phil

-- 
  Philip Kendall <pak21@srcf.ucam.org>
  http://www.srcf.ucam.org/~pak21/
0
pak21 (655)
11/17/2003 9:55:51 PM
In article <hTzwXIAJxTu$Ewgr@wearmouth.demon.co.uk>, Geoff Wearmouth
<geoff@wearmouth.demon.co.uk> wrote:

> >Can someone please extract the TRACE command from the TK95 ROM, the ON
> >ERROR command from the TS2068 ROM, and the RENUM command from the Spanish
> >128 Editor ROM. 

> Your challenge would be more appealing if you described how a trace or
> on error would work.

Well TRACE is simple. TRACE 0 turns it off TRACE 1 turns it on, and it
executes the program one line at a time, displaying the current line
number in the lower left corner of the screen (on line 24). ON ERROR has
three options:

ON ERROR CONTINUE - ignores errors and executes the next line
ON ERROR GOTO - jump to a given line in the event of an error
ON ERROR STOP - effectively turns the ON ERROR command off.

> Just ripping someone else's code is close to
> plagiarism whereas clean-room code, even if the end result is similar to 
> something else, is likely to be more robust and better documented. I'm 
> currently extracting a renumber from one of my own programs so that will
> be available commented next year when the New Zealand winters drive you
> back to these shores.  

Thanks for the heads-up on the RENUM code. The reason I suggested ripping
code from these ROMs is that it's a place to start. When I added new
commands to the Basic ROM I looked at the way the TS2068 and TK95 ROMs
handled it and then wrote my own routines based on a combination of ideas.
My solution is more elegant the other ROMs, but I have the luxury of a
modern development system. On the other hand, if I hadn't looked at the
original code I might never have figured it out. Plus Amstrad owns the
RENUM code, and Timex owns the ON ERROR code and they have both given
distribution permission. The TK95 code is copyright MicroDigital, but as
it was an illegal clone it's in a bit of a grey area. I wouldn't want a
carbon copy of the TK95 code anyway though since it's a little inelegant.
 
> >It would
> >also be helpful if someone could write a printer driver for the ZX Printer
> >that operates externally from the Spectrum ROM. I want to relocate the
> >printer driver code outside the normal ROM area so I can reclaim the 256
> >byte buffer for other purposes. I suggest looking at Geoff Wearmouth's Sea
> >Change ROM for inspiration.

> I assume you are keeping the 256 bytes and not sliding the system
> variables down, as I did, as the latter makes it impractical for
> compatibility.

Correct. I plan to move the UDGs there and use the remaining 88 bytes for
something else, possibly the external ZX Printer code.

> That's why the Sea-Change ROM is just a novelty concept
> computer. It's actually pretty easy as most of the work is already done.
> The only trouble is that PR_CC would have to be in the pointer group of
> system variables and that is too great a change. I opted for a lateral
> thought alternative that allows up to 13 simultaneous buffers instead.

Trouble is PR_CC is longer than 88 bytes as I recall. Although I see
nothing wrong with the 13 simultaneous buffers concept.

Cheers again for the input Geoff!

-Andrew
0
aoweninoz (369)
11/17/2003 10:24:10 PM
In article <oprysw0povwur7eh@news.verizon.net>, "Sinclair QL a.k.a. P.D"
<do.not.bother.me@spammer.net> wrote:

> On another note, I think that the Zip compiler has features like that and 
> probably S.N.G could be kind enough to provide the code (He's a great guy 
> anyway!)

I had a look at some of the Basic tool kits that offer ON ERROR and RENUM
commands, but I had no luck integrating the ON ERROR code and the RENUM
routines were just too big. I'm fairly sure the one in 128 Basic is fairly
small, although it's also a bit limited in its scope.

-Andrew
0
aoweninoz (369)
11/17/2003 10:26:03 PM
In article <bpbg57$ebf$1@kern.srcf.societies.cam.ac.uk>, pak21@cam.ac.uk
(Philip Kendall) wrote:

>>Hmmm not totally... The TK95 ROM was a blatant Rip-off anyway so 
>>"stealing" from the thieves can't be so bad now can it? :-D
> 
> Since when have two wrongs made a right?

No, but three do! :)

In all seriousness though, I just don't have the time and energy to do SE
Basic as a clean room project. I've already been influenced by most of the
decent custom ROMs out there as it was studying those that got me started
on the project in the first place. There's a lot of Geoff's code in there,
there's a bit of Ian Collier's code, and there are a few bytes of code I
found floating around on the net. Most of the new code is 100% original
and my own work, particularly the restructuring of the ROM and the removal
of redundant code, like the old keyboard routines. But when it comes down
to it, over 80% of it is still Amstrad's original code and that's
reflected in the copyright message.

-Andrew
0
aoweninoz (369)
11/17/2003 10:32:27 PM
In article <aoweninoz-1711032224110001@host213-122-231-99.in-
addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes


>Well TRACE is simple. TRACE 0 turns it off TRACE 1 turns it on, and it
>executes the program one line at a time, displaying the current line
>number in the lower left corner of the screen (on line 24). ON ERROR has
>three options:
>
>ON ERROR CONTINUE - ignores errors and executes the next line
>ON ERROR GOTO - jump to a given line in the event of an error
>ON ERROR STOP - effectively turns the ON ERROR command off.

Hi Andrew,

believe me, you will get a far better response from a challenging 
specification than the first request. I remember having a quick look at
the TK95 ROM to test the division routine and they had made a mess of
that.

I have already given these some thought and they will be a pleasant way
to pass an evening sometime soon. I remember that ON ERROR is in my
Dartmouth College BASIC manual and TRACE sounds fun in the same way as
Paul Dunn's BASic is fun.

I am currently at work on an ordinary 48K ROM

http://www.wearmouth.demon.co.uk/gw03.rom

The name implies that I may finish it by the end of the year. :-)

So far it only has a neat tokenizer and the original Spectrum Warm
restart.

The ZX80 had a tokenizer and Ian Collier's ROM was fair but the Proof of
Concept was the LEC-80 ROM.  Once you know it can be done, the rest is
much simpler.  I've only carried out some simple tests so far but it is
fairing well. You can switch between single letter mode and normal
keyword mode by using STOP at the command line.

The Warm restart is great and was featured on the Sea Change ROM
except it couldn't load games so pretty useless.

Now, you can load any machine code game, activate the NMI and you get

X NMI BREAK into program, 0:1

I've just tried it with Jet Set Willy and you get back to the command
line with the BASIC loader and all the game in memory. Set the paper to
white, clear the screen and the listing is revealed.

The surprising thing is that most of the code is in the normal Spectrum
ROM. The only thing I've added is that the initialization routines check
if the high byte of CHANS is non-zero and if it is then it must have
arrived there via the NMI so it jumps forward to the error routine.

If you write your own code and forget to enable interrupts then you get
stuck at the HALT instruction at MAIN-4.  Activating the NMI also
recovers from that situation.  Neat.

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/18/2003 11:00:59 PM
>>>Hmmm not totally... The TK95 ROM was a blatant Rip-off anyway so 
>>>"stealing" from the thieves can't be so bad now can it? :-D
>> 
>> Since when have two wrongs made a right?
>
>No, but three do! :)

It's three lefts that do, not three wrongs.

METALBRAIN
(C) 1977 Tejedor & G�mez Research Ltd.
0
11/19/2003 1:02:33 AM
Philip Kendall <pak21@cam.ac.uk> did eloquently scribble:
> In article <oprysw0povwur7eh@news.verizon.net>,
> Sinclair QL a.k.a. P.D <do.not.bother.me@spammer.net> wrote:
>>
>>Hmmm not totally... The TK95 ROM was a blatant Rip-off anyway so 
>>"stealing" from the thieves can't be so bad now can it? :-D
> 
> Since when have two wrongs made a right?
> 
> (Yes, I see the smiley!)

Besides, doesn't the original speccy 128 already have renumber in the editor
menu?

Shirley it's just a matter of creating a command that hooks that?
-- 
______________________________________________________________________________
|   spike1@freenet.co.uk   | "Are you pondering what I'm pondering Pinky?"   |
|Andrew Halliwell BSc(hons)|                                                 |
|            in            | "I think so brain, but this time, you control   |
|     Computer Science     |  the Encounter suit, and I'll do the voice..."  |
------------------------------------------------------------------------------
0
spike1 (8171)
11/19/2003 1:17:03 AM
In article <FK7pRWArSqu$EwVO@wearmouth.demon.co.uk>, Geoff Wearmouth
<geoff@wearmouth.demon.co.uk> wrote:

[TRACE and ON ERROR commands]
 
> I have already given these some thought and they will be a pleasant way
> to pass an evening sometime soon. I remember that ON ERROR is in my
> Dartmouth College BASIC manual and TRACE sounds fun in the same way as
> Paul Dunn's BASic is fun.

Well, thanks again for the help.

> I am currently at work on an ordinary 48K ROM

Just had a look at it (well I loaded it into an emu, I didn't look at the
code). I'll bet your tokenizer code is more efficient than the code in SE
Basic. Any chance I could pinch it? :)

> The ZX80 had a tokenizer and Ian Collier's ROM was fair but the Proof of
> Concept was the LEC-80 ROM.

LEC-80 was my inspiration too, but the tricky part is writing a
detokenizer so lines are converted back to ASCII when you EDIT them (like
in 128 Basic). There's another challenge for you if you're interested.

We really should do a joint ROM one of these days. :)

-Andrew
0
aoweninoz (369)
11/19/2003 12:22:09 PM
In article <aoweninoz-1911031222090001@dial81-131-147-212.in-
addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes

>> I am currently at work on an ordinary 48K ROM

>Just had a look at it (well I loaded it into an emu, I didn't look at the
>code). I'll bet your tokenizer code is more efficient than the code in SE
>Basic. Any chance I could pinch it? :)

Certainly.
It was quite small at first, just over 100 bytes but after the
intricacies of REMarks, quotes, and expressions like goto and a>=b
I was staggered to see it had gained another 80 bytes.
It's called gw03.txt and is in this zip file which is the same as the
one available on my site. No room for an online version - I need a
bigger site. The code is completely unrefined.

http://www.wearmouth.demon.co.uk/zx.zip

>LEC-80 was my inspiration too, but the tricky part is writing a
>detokenizer so lines are converted back to ASCII when you EDIT them (like
>in 128 Basic). There's another challenge for you if you're interested.
I'll put it on the list :-) 
I made a slip and the ZX80 parses the individual characters of PEEK - it
doesn't tokenize them.

>We really should do a joint ROM one of these days. :)
Well as I've said before I like the simple, non-bank-switched systems
and that's the attraction of the ZX series. I also like to know what
goes on inside. I can't keep up with the innards of my PC - I just use
it.  I always thought that there was room for one more ZX computer but
it was not to be.

It was Manic Miner I tested the NMI on - not JSW though it may be
similar. 

Cheers,

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/19/2003 7:25:23 PM
In article <ftsq81-j75.ln1@ridcully.fsnet.co.uk>, spike1@freenet.co.uk wrote:

> Besides, doesn't the original speccy 128 already have renumber in the editor
> menu?

No. The original 128 doesn't have menus. You're thinking of the UK
machine. The Spanish machine which preceded it had some new commands,
RENUM being one of them.
 
> Shirley it's just a matter of creating a command that hooks that?

There are too many reasons to list here for not wanting to use the 128
Editor. I've figured out a way to emulate the 128 Basic environment on the
ZX Spectrum SE for backwards compatiblity with BASIC programs that use the
PLAY command and the RAM disk though.

-Andrew
0
aoweninoz (369)
11/19/2003 8:26:45 PM
In article <UcpN0iAjO8u$Ew21@wearmouth.demon.co.uk>, Geoff Wearmouth
<geoff@wearmouth.demon.co.uk> wrote:

[Tokenizer code]

>>Any chance I could pinch it? :)
> 
> Certainly.

Thanks!

> It was quite small at first, just over 100 bytes but after the
> intricacies of REMarks, quotes, and expressions like goto and a>=b
> I was staggered to see it had gained another 80 bytes.
> It's called gw03.txt and is in this zip file which is the same as the
> one available on my site. No room for an online version - I need a
> bigger site. The code is completely unrefined.
> 
> http://www.wearmouth.demon.co.uk/zx.zip

Ah! My code is 177 bytes in total and includes support for 6 new tokens.
Maybe I'll stick with what I've got after all. :)

[detokenizer]

> >There's another challenge for you if you're interested.

> I'll put it on the list :-) 

Cheers!

> I made a slip and the ZX80 parses the individual characters of PEEK - it
> doesn't tokenize them.

I never really examined the ZX80 ROM that closely.

> >We really should do a joint ROM one of these days. :)

> Well as I've said before I like the simple, non-bank-switched systems
> and that's the attraction of the ZX series. I also like to know what
> goes on inside. I can't keep up with the innards of my PC - I just use
> it.  I always thought that there was room for one more ZX computer but
> it was not to be.

Ok, so the ZXSE has bank-switched RAM, on the other hand I want SE Basic
to be a self contained 16K ROM that will work on anything from a 16K
machine upwards. Apart from a few bits of code in the initialisation code
to reset the extended hardware and the SYSTEM command - to control said
bank switching from Basic, I think our aims are not too dissimilar. And I
totally agree on the PC side of things. I wouldn't know where to begin
programming my Mac. As for another ZX computer, I think the Timex Computer
TC3256 prototype looked very interesting, and the Timex Sinclair TS3068
might have succeeded where the SAM failed, but while it's not all
singing-all dancing, I think the ZX Spectrum SE does a decent job of
folding in support for most of the existing Sinclair machines and clones
into one machine - and if it is possible to reduce it to a few chips it
might be feasible to manufacture a few at a reasonable cost, but anyway, I
digress.

> It was Manic Miner I tested the NMI on - not JSW though it may be
> similar.

Had a look at the 'warm reset' code in the original ROM. I seem to remeber
you mentioning this as a possiblity a long time ago. I'll be interested to
see what you've discovered by the time I get back from New Zealand.

-Andrew
0
aoweninoz (369)
11/19/2003 8:40:52 PM
In article <aoweninoz-1911032040530001@dial81-131-68-131.in-
addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes

>> http://www.wearmouth.demon.co.uk/zx.zip
>
>Ah! My code is 177 bytes in total and includes support for 6 new tokens.
>Maybe I'll stick with what I've got after all. :)
Bah! You'll come crawling back when you realize that mine can do
1<>2 and x<=y  :-)
Until I fully test it, mine is in longhand and testing will take a while 
although I really want to add that CAT command.

>> I made a slip and the ZX80 parses the individual characters of PEEK - it
>> doesn't tokenize them.
>
>I never really examined the ZX80 ROM that closely.
Gosh you should.  My tokenizer uses the RECLAIM-1 routine to get rid of
the individual characters as no doubt does yours.  Well the routine
began life in the ZX80 as did POINTERS and MAKE-ROOM etc.  Once you
scroll past the curious display routines you will be in very familiar
territory indeed.

This where the small-is-beautiful, keep-it-unpretentious ZX concept
began.

>Had a look at the 'warm reset' code in the original ROM. I seem to remeber
>you mentioning this as a possiblity a long time ago. I'll be interested to
>see what you've discovered by the time I get back from New Zealand.
Yes it would originally be intended to assist assembly language
programmers, (the Enterprise Elan had one) and not for breaking into
games.  The Enterprise had little software and the Spectrum had loads.
I think there is a connection. It also explains the HALT at MAIN-4 but
you have to really think that one through.

I'll tell you when you get back :-)

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/19/2003 10:37:55 PM
In article <afB+0sADD$u$Ewmb@wearmouth.demon.co.uk>, Geoff Wearmouth
<geoff@wearmouth.demon.co.uk> wrote:

> >Ah! My code is 177 bytes in total and includes support for 6 new tokens.
> >Maybe I'll stick with what I've got after all. :)

> Bah! You'll come crawling back when you realize that mine can do
> 1<>2 and x<=y  :-)

Mine can do 1<>2 but x<=y does require spaces: x <= y. Adding the code to
do that would probably make it an even match. :)

> Until I fully test it, mine is in longhand and testing will take a while 
> although I really want to add that CAT command.

The one from SC01.ROM?

> >I never really examined the ZX80 ROM that closely.

> Gosh you should.  My tokenizer uses the RECLAIM-1 routine to get rid of
> the individual characters as no doubt does yours.  Well the routine
> began life in the ZX80 as did POINTERS and MAKE-ROOM etc.  Once you
> scroll past the curious display routines you will be in very familiar
> territory indeed.
> 
> This where the small-is-beautiful, keep-it-unpretentious ZX concept
> began.

Yeah, I've been thinking about that, and there are some features I'm
thinking about removing from SE Basic because they're over-blown.

-Andrew
0
aoweninoz (369)
11/20/2003 12:29:19 AM
In article <aoweninoz-2011030029190001@dial81-131-13-73.in-
addr.btopenworld.com>, Andrew Owen <aoweninoz@yahoo.com.au> writes
>Mine can do 1<>2 but x<=y does require spaces: x <= y. Adding the code to
>do that would probably make it an even match. :)
Of course mine just alters the behaviour of 26 keys. You can switch
between modes using STOP and type keywords like RESTORE both ways.

[ CAT command ]
>The one from SC01.ROM?
Yes.  While testing that I wrote the streams and channels on paper and
thought "What I really need is a command to show me these".  I suppose
that the Proof of Concept or germ of the idea came from Andy Pennell's
stream lister in his microdrive book but I do wonder if it's been there
before.  CAT 1 will still give the error that is necessary for Interface
1 compatibility.

>>I never really examined the ZX80 ROM that closely.
>> This where the small-is-beautiful, keep-it-unpretentious ZX concept
>> began.
Looking at the Nokia thread, it is amazing that a bunch of routines
written between 1979 and 1981 are now being carried about and used in
Java phones.  Yet the pioneers are not phased by this and are still on
top of their respective hills.


-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/20/2003 8:25:25 AM
aoweninoz@yahoo.com.au (Andrew Owen) wrote:
> <geoff@wearmouth.demon.co.uk> wrote:
> Just had a look at it (well I loaded it into an emu, I didn't look at the
> code). I'll bet your tokenizer code is more efficient than the code in SE
> Basic. Any chance I could pinch it? :)

You can take the tokeniser from my ROM if you want. Version 0.06 has a bug
where PRINT INK x is incorrectly tokenised, but version 0.07 works. The source
is at http://www.mdfs.net/Software/Spectrum/Harston/Patch7.src with docs in
the same directory.

> though I really want to add that CAT command.

There's a CAT from tape command in there as well. Feel free to copy/adapt it.
The docs say "reuse permitted", etc.

-- 
JGH - www.mdfs.net
0
jgh2 (975)
11/20/2003 11:06:16 AM
Yadda, yadda, yadda, Andrew Owen, blah, blah, blah, 19 Nov 2003, gibber,
news:aoweninoz-1911032026450001@dial81-131-68-131.in-addr.btopenworld.com
: 

> In article <ftsq81-j75.ln1@ridcully.fsnet.co.uk>, spike1@freenet.co.uk
> wrote: 
> 
>> Besides, doesn't the original speccy 128 already have renumber in the
>> editor menu?
> 
> No. The original 128 doesn't have menus. You're thinking of the UK
> machine. The Spanish machine which preceded it had some new commands,
> RENUM being one of them.

I didn't know that the original Spanish 128 didn't have menus, coo!  Is 
there anywhere that has this for download (for Spectaculator?)  I 
downloaded the ROM 0 and 1 files from Phil's site and joined them with COPY 
/B but Spectaculator doesn't want to know (even though the size is 16K.)  I 
also just realised that the FAQ isn't searchable, bugger!

I'll be Googling anyway.

-Stef
-- 
New to Speccy emulation? Read this group's FAQ at:
<URL:http://www.sinclairfaq.com/>
0
stefrobb1 (25)
11/20/2003 12:44:03 PM
In article <Xns943981883646Bpoobaaarse@217.32.252.50>,
Stef Robb  <stefrobb@naespam.yahoo.co.uk> wrote:
>I also just realised that the FAQ isn't searchable, bugger!

Download one of the off-line versions and search that?

Cheers,

Phil

-- 
  Philip Kendall <pak21@srcf.ucam.org>
  http://www.srcf.ucam.org/~pak21/
0
pak21 (655)
11/20/2003 12:54:34 PM
Yadda, yadda, yadda, Philip Kendall, blah, blah, blah, 20 Nov 2003, gibber, 
news:bpidia$so4$1@kern.srcf.societies.cam.ac.uk:

> In article <Xns943981883646Bpoobaaarse@217.32.252.50>,
> Stef Robb  <stefrobb@naespam.yahoo.co.uk> wrote:
>>I also just realised that the FAQ isn't searchable, bugger!
> 
> Download one of the off-line versions and search that?

Ah, yes, I just got so used to being 'plugged-in' all day that I never 
thought of that!  D'oh!

-Stef

-- 
New to Speccy emulation? Read this group's FAQ at:
<URL:http://www.sinclairfaq.com/>
0
stefrobb1 (25)
11/20/2003 4:38:30 PM
In article <73210e4c.0311200306.4fef7f3d@posting.google.com>,
J.G.Harston <jgh@arcade.demon.co.uk> writes

>You can take the tokeniser from my ROM if you want. Version 0.06 has a bug
>where PRINT INK x is incorrectly tokenised, but version 0.07 works. The source
>is at http://www.mdfs.net/Software/Spectrum/Harston/Patch7.src with docs in
>the same directory.

Many thanks. I'll give it a detailed look when I put mine to bed and
tidy up the comments a bit. You had me worried with that test but it
just shows how deeply these things have to be tested.

I liked the way you allow * to introduce new commands and you've also
anticipated the problem I have yet to address.  Namely that if I will
have full Interface 1 compatibility then the NMI vector will conflict.

>> though I really want to add that CAT command.
>
>There's a CAT from tape command in there as well. Feel free to copy/adapt it.
>The docs say "reuse permitted", etc.

Well that goes for all my Spectrum stuff also . I have never claimed
copyright.  Last year on this newsgroup we developed a public domain
ZX81/Spectrum Newton square root routine which gives an interesting
increase in speed.

'My' CAT catalogues the streams to the screen with a free memory report
at the top.  Once you've used it you can't work without it.

Real nice to see another ROM on Phil's page.  I will be mailing you. 

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/20/2003 8:32:41 PM
Geoff Wearmouth <geoff@wearmouth.demon.co.uk> wrote in message news:<KSKqHuApTSv$Ew8C@wearmouth.demon.co.uk>...
> In article <73210e4c.0311200306.4fef7f3d@posting.google.com>,
> J.G.Harston <jgh@arcade.demon.co.uk> writes
> 
> Well that goes for all my Spectrum stuff also . I have never claimed
> copyright.  Last year on this newsgroup we developed a public domain
> ZX81/Spectrum Newton square root routine which gives an interesting
> increase in speed.
> 
I would like to make another suggestion to all this fantastic people
that are improving the spectrum ROM. Why not change the CIRCLE
routine? It is the worst peace of code in the ROM. I have implemented
one that only uses integer math and is many times faster than the
standard one. It uses the Bresenham algorithm.

Circles have the property of being highly symmetrical, which is handy
when it comes to drawing them on a display screen.

      |y          
      |           
  \ ..... /
   .  |  .        We know that there are 360 degrees in a circle.
First we
  . \ | / .       see that a circle is symetrical about the x axis, so
  .  \|/  .       only the first 180 degrees need to be calculated.
Next
--.---+---.--     we see that it's also symetrical about the y axis,
so now
  .  /|\  . x     we only need to calculate the first 90 degrees.
Finally
  . / | \ .       we see that the circle is also symetrical about the
45
   .  |  .        degree diagonal axis, so we only need to calculate
the
  / ..... \       first 45 degrees.
      |
      |

Bresenhams circle algorithm calculates the locations of the pixels in
the first 45 degrees. It assumes that the circle is centered on the
origin. So for every pixel (x,y) it calculates we draw a pixel in each
of the 8 octants of the circle.

The algorithm is simple:
Given a radius for the circle we perform this initialisation:

d := 3 - (2 * RADIUS)
x := 0
y := RADIUS
Now for each pixel we do the following operations:

Draw the 8 circle pixels
if d < 0 then
    d := d + (4 * x) + 6
else
  begin
    d := d + 4 * (x - y) + 10
    y := y - 1;
  end;

And we keep doing this until x = y. 

If you want the code I can post it here or reply to email.


Cheers
RTunes
0
11/21/2003 10:16:51 AM
In article <f3da67db.0311210216.3a55edfa@posting.google.com>, Rui Tunes
<ruijtunest@netscape.net> writes

>I would like to make another suggestion to all this fantastic people
>that are improving the spectrum ROM. Why not change the CIRCLE
>routine? It is the worst peace of code in the ROM.

Gosh! :-)
I do know what you mean.  It's appearance in the Complete Spectrum ROM 
assembly is rather busy.  I've tried to document it, or encourage others
to do it for six years now.  However four weeks ago I decided to advance
further than my customary extra instruction and managed to complete the  
comments to a fair degree.  The routine is now one of my favourites and
is very beautiful.  It embraces the "ROTATION FORMULA" which has many
references on the Internet and also involves the "DOUBLE ANGLE FORMULA"
to derive cosine from sine, saving some resources.
The Rotation Formula is normally used with co-ordinates from the centre
of a circle but on the Spectrum it is used with the co-ordinates from
the current point relative to the previous point and the formula return
the co-ordinates to draw to.  

The same formula is used more conventionally to find the direction of
the first straight line when drawing an arc.  Thereafter it just draws
straight lines with periodic turns to complete the arc or circle using
the same routine.  Similar to turtle graphics as the radius never enters
the equation again.

The calculator stack appears busier than it actually is as it often just
holds values to prevent them being overwritten in the lower memory
cells.

My explanation is hot off the presses and I would welcome any
corrections and improvement although I want to keep the concept simple. 

[ A WELL EXPLAINED BRESENHAM ALGORITHM ]

>If you want the code I can post it here or reply to email.

Here is usually fine Rui.

Does anybody want to document the DRAW routine that comes after the 
CIRCLE routine? I know it is in the ZX81 manual. Is it the Bresenham 
draw algorithm? 

Cheers,

-- 
Geoff Wearmouth
The ZX Circle algorithm   http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/21/2003 9:40:59 PM
On Thu, 20 Nov 2003 12:44:03 +0000 (UTC) da kidz on comp.sys.sinclair were rappin'
to MC Stef Robb:

> I didn't know that the original Spanish 128 didn't have menus, coo!  Is 
> there anywhere that has this for download (for Spectaculator?)  I 
> downloaded the ROM 0 and 1 files from Phil's site and joined them with COPY 
> /B but Spectaculator doesn't want to know (even though the size is 16K.)  I 
> also just realised that the FAQ isn't searchable, bugger!
> 
> I'll be Googling anyway.

Andrew Owen has an English translation of the Spanish 128 ROMs which are
at http://www.worldofspectrum.org/sinclairbasic/ (I think)

Don't know about Speculator, but works fine in ASp.

Chris

-- 
+-------------------------------------------+
| Unsatisfactory Software - "because it is" |
|  http://www.unsatisfactorysoftware.co.uk  |
| Your Sinclair: A Celebration              |
+-- http://www.ysac.cjb.net/ --ICQ:28784166-+

DISCLAIMER: I may be making all this stuff up again.
0
chrisy (143)
11/22/2003 5:27:17 PM
On Mon, 17 Nov 2003 22:24:10 +0000 da kidz on comp.sys.sinclair were rappin'
to MC Andrew Owen:

> ON ERROR has three options:
> 
> ON ERROR CONTINUE - ignores errors and executes the next line
> ON ERROR GOTO - jump to a given line in the event of an error
> ON ERROR STOP - effectively turns the ON ERROR command off.

It would be nice to have a more generic ON command, so you can do ON A
GOSUB 10,20,30 (or something like that, I forget the syntax of this
command).  At the moment, you have to do complex calculations to jump to
different line numbers depending on the value of a variable - or a
thousand IFs.

Chris

-- 
+-------------------------------------------+
| Unsatisfactory Software - "because it is" |
|  http://www.unsatisfactorysoftware.co.uk  |
| Your Sinclair: A Celebration              |
+-- http://www.ysac.cjb.net/ --ICQ:28784166-+

DISCLAIMER: I may be making all this stuff up again.
0
chrisy (143)
11/22/2003 5:30:37 PM
Geoff Wearmouth <geoff@wearmouth.demon.co.uk> wrote in message news:<JI6KBKArZov$Ewcr@wearmouth.demon.co.uk>...
> >If you want the code I can post it here or reply to email.
> 
> Here is usually fine Rui.

;------------------------------
; Bresenham's circle algorithm 
;
; * parameters : 
;    - D : x coordinate of center
;    - E : y coordinate of center
;    - B : radius - allow djnz's       
;
;------------------------------

circle: push bc                        
               
        ld      H,0
        ld      L,B
        rlc     B
        ld      A,$03
        sub     B
        push    AF
Loop:
        ld      A,D             ;Point #1
        add     A,H
        ld      c,A
        ld      A,E
        add     A,L
        ld      b,A

        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl            
      
        
        ld      A,E             ;Point #2
        sub     L
        ld      b,A
              
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl         
                  
        
        ld      A,D             ;Point #4
        sub     H
        ld      c,A
               
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
                  
        
        ld      A,E             ;Point #3
        add     A,L
        ld      b,A
                  
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
             
        
        ld      A,D             ;Point #5
        add     A,L
        ld      c,A
        ld      A,E
        add     A,H
        ld      b,A
                  
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
        
        ld      A,E             ;Point #6
        sub     H
        ld      b,A
                 
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
                
        
        ld      A,D             ;Point #8
        sub     L
        ld      c,A
             
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
                 
        
        ld      A,E             ;Point #7
        add     A,H
        ld      b,A
                
        push hl 
        push bc             
        call plotpixel
        pop bc
        pop hl       
               
    
        
        ld      A,H             ;is the circle finished ?
        sub     L
        jr      NC,EndCircle     ;yes
        pop     AF
        ld      B,A
        ld      A,H
        bit     7,B
        jr      Z,Pos
Neg:                            ;case d<0
        rla
        rla
        add     A,B
        add     A,$06
        push    AF
        jr      EndC
Pos:                            ;case d>=0
        sub     L
        rla
        rla
        add     A,B
        add     A,$0A
        push    AF
        dec     L
EndC:                           ;one loop has been performed
        inc     H
        jr      Loop            
EndCircle:
        pop     AF              ;MUST NOT BE REMOVED
        pop     bc
        ret


 
> Does anybody want to document the DRAW routine that comes after the 
> CIRCLE routine? I know it is in the ZX81 manual. Is it the Bresenham 
> draw algorithm? 
I can document DRAW-LINE but not the entire DRAW routine.
Yes, it uses the Bresenham algorithm. 

RTunes
0
11/24/2003 10:30:44 AM
In article <f3da67db.0311240230.644af0ee@posting.google.com>, Rui Tunes
<ruijtunest@netscape.net> writes
>Geoff Wearmouth <geoff@wearmouth.demon.co.uk> wrote in message news:<JI6KBKArZov
>$Ewcr@wearmouth.demon.co.uk>...
>> >If you want the code I can post it here or reply to email.
>> 
>> Here is usually fine Rui.

>;------------------------------
>; Bresenham's circle algorithm 

>> Does anybody want to document the DRAW routine that comes after the 
>> CIRCLE routine? I know it is in the ZX81 manual. Is it the Bresenham 
>> draw algorithm? 

>I can document DRAW-LINE but not the entire DRAW routine.
>Yes, it uses the Bresenham algorithm. 

Thank you for volunteering Rui.

Just cut and paste the section $24B7 to $24F9
and mail it to me. No hurry and your own words.

http://www.wearmouth.demon.co.uk/zx82.htm#L24B7

Thanks for the circle code.

Best Regards,


-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
11/24/2003 6:55:17 PM
"Chris Young" <chrisy@activatormail.com> wrote in message news:<3FBF9D3D.MD-1.4.17.chrisy@activatormail.com>...
> On Mon, 17 Nov 2003 22:24:10 +0000 da kidz on comp.sys.sinclair were rappin'
> to MC Andrew Owen:
> 
> > ON ERROR has three options:
> > 
> > ON ERROR CONTINUE - ignores errors and executes the next line
> > ON ERROR GOTO - jump to a given line in the event of an error
> > ON ERROR STOP - effectively turns the ON ERROR command off.
> 
> It would be nice to have a more generic ON command, so you can do ON A
> GOSUB 10,20,30 (or something like that, I forget the syntax of this
> command).  At the moment, you have to do complex calculations to jump to
> different line numbers depending on the value of a variable - or a
> thousand IFs.
> 
> Chris



Not in this way.
Suppose A can hold the values 1 to 10
just DIM E(10) and LET E(1)=100, LET E(2)=123, LET E(3)=500, LET E(4)=350 etc...
You can use it in your program as
10 GO SUB E(A)
0
koelman28 (20)
11/25/2003 4:34:18 PM
On 25 Nov 2003 08:34:18 -0800, koelman28@zonnet.nl (Johan Koelman)
wrote:

>Not in this way.
>Suppose A can hold the values 1 to 10
>just DIM E(10) and LET E(1)=100, LET E(2)=123, LET E(3)=500, LET E(4)=350 etc...
>You can use it in your program as
>10 GO SUB E(A)

I like this a lot. All those years of Speccy BASIC programming and I
never figured that elegant little solution out.
-- 
Chris Cowley
0
11/25/2003 5:23:59 PM
Geoff Wearmouth <geoff@wearmouth.demon.co.uk> wrote in message news:<UcpN0iAjO8u$Ew21@wearmouth.demon.co.uk>...

> Certainly.
> It was quite small at first, just over 100 bytes but after the
> intricacies of REMarks, quotes, and expressions like goto and a>=b
> I was staggered to see it had gained another 80 bytes.
> It's called gw03.txt and is in this zip file which is the same as the
> one available on my site. No room for an online version - I need a
> bigger site. The code is completely unrefined.

Geoff, if you need to get rid of some stuff, please
let me know.  I can move some of it elsewhere :-)

Alvin
0
A936 (148)
11/28/2003 4:36:55 PM
In article <1a3493d2.0311280836.192b0b54@posting.google.com>, Alvin
<A936@hotmail.com> writes
>Geoff, if you need to get rid of some stuff, please
>let me know.  I can move some of it elsewhere :-)
>
>Alvin
Hi Alvin

Yes I visit your site regularly.

http://www.geocities.com/aralbrec/

The space problems at my site are largely self-inflicted and it needs
a re-arrangement.  I've always appreciated your contributions - in
particular your comments on the Spectrum routines which have propagated
into the new file when I get it online.

The ROM is almost finished with a cute Block delete and renumber.

http://www.wearmouth.demon.co.uk/gw03.rom

No space for the UDG editor which will probably be replaced by a simple
memory dump.

-- 
Geoff Wearmouth
The ZX ROM Files http://www.wearmouth.demon.co.uk
0
geoff82 (757)
12/1/2003 6:48:43 AM
Geoff Wearmouth <geoff@wearmouth.demon.co.uk> wrote in message news:<BO$oQLALRuy$EwVB@wearmouth.demon.co.uk>...

Hi Geoff
 
> The space problems at my site are largely self-inflicted and it needs
> a re-arrangement.  I've always appreciated your contributions - in
> particular your comments on the Spectrum routines which have propagated
> into the new file when I get it online.

And I've still got the partially commented RS232 routine I
promised you :)  I'll see if I can move it along -- unless
you've already done it that is!

> The ROM is almost finished with a cute Block delete and renumber.
> 
> http://www.wearmouth.demon.co.uk/gw03.rom
> 
> No space for the UDG editor which will probably be replaced by a simple
> memory dump.

Yep, I've downloaded it already and will experiment with it
when I've got a bit of time.  Been really busy of late and
looks like that will continue for a couple of weeks.

I will also be checking out the warm reset.  I actually have
a similar thing on my JLO disk interface for my ts2068.
The NMI button allowed a screen dump to printer, state save
or a warm reset.  If you're interested, the source for the
JLO disk firmware was uploaded to nvg in one of the ts2068
directories by the author several years ago.  It is designed
to work with both the Spectrum ROM and the ts2068 ROM.

Alvin
0
A936 (148)
12/3/2003 9:53:23 AM
Reply:

Similar Artilces:

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

sys.argv[0]
Hi! I have the following problem within a program, that is using the python dll. With this program i want to use Tkinter, but after setting all paths i get the following error: Traceback (most recent call last): File "c:/mtt/bg_private_area/truefalsetest.py", line 32 in ? ListSelection(datal) File "C:\Prog1\MttDialogs.py", line 324 in ListSelection root = Tk() File "C:\Prog1\lib\lib-tk\Tkinter.py", line 1491, in __init__ baseName = os.path.basename(sys.argv[0]) AttributeError: 'module' object has no attribute 'argv' Redirected...

'/proc/sys/kernel/modprobe' set to '/bin/true'?!
Even the 'Automatic kernel module loading' was enabled when compiling the 2.6.6 kernel, the feature is 'disabled' because '/proc/sys/kernel/modprobe' is set to '/bin/true'. Setting the value to '/sbin/modprobe' enables the kmod and the modules are automatically loaded. Why '/proc/sys/kernel/modprobe' gets set with the wrong value? How can I fix this? Thanks, Petru In article <584a5462.0406231905.9fede90@posting.google.com>, Petru Marginean <petrum@hotmail.com> wrote: > Even the 'Automatic kernel module loading' was enab...

[News] ODF a Programmer's Friend, OOXML a Programmer's Foe
Web and Application development ,----[ Quote ] | How well is ODF and OOXML supported in different languages? | | I started off by choosing six common languages used by application and Web | developers, then I went and looked for what libraries are available for each | document format: | Language ODF OOXML | Python Yes No | Perl Yes No | Ruby Yes No | PHP Yes Started | Java Yes Started | Microsoft C# Yes Yes `---- http://commandline.org.uk/more/formats/library-shootout-odf-vs-ooxml-2007-11-28-00-03.html...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked form fields. This never works when doing an APPEND/UPDATE query. It can never find the values of linked form fields, Access always asks for the parameter value of the field(s) in question, or Access comes up with an error 3323 - No recordset. I am sure there are other people that have had this problem. What is the difference between Select queries and append/update queries? the append/update queries never seem to be able to find values in linked form fields. Can anyone shed any light on this or point to a knowledgebase Item, or even recommend a book focusing on this subject, I will go and buy it now. I have been for up 2 nights trying to acomplish this and now considering suicide, please help. Thanks In advance, Aaron. I know of two ways you can accomplish this. 1. You can create the SQL script for you append or update query and run the script with DoCmd.RunSQL. 2. You can create a...

Programmers, Programmers, Programmers, ...
As Steve Balmer correctly stated, while making his monkey dance, it is applications and hence programmers that make a platform. The fact though is that if you want to do professional programming, then Linux is the platform for you. I know that this statement will get the heckels up on a lot of trolls in C.O.L.A, but I have a recent experience that proves this. I am currently working for a Windows only house producing a system that receives and transmits around 1000 telegrams per second in each direction on a UDP socket, translates them into a different format and creates a log entry for each ...

sys.exit and '-i'
Hi! The unittest module will invoke sys.exit() after running the tests in order to signal success or failure. However, I sometimes don't want to exit the interpreter but instead e.g. inspect some state or just keep the window open. Normally, using '-i' as commandline argument works, but not in the case here. My questions are: 1. Is that a bug? After all, an explicit request on the commandline was ignored. Is it perhaps simply wrong how the unittest module handles error/success signalling? 2. I can catch the SystemExit exception and ignore it, but that doesn't actually help, b...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Hi, Thanks for ur help there HJ. I know how to do the tasks you specified there. I would like for the update query to use field values from some of the fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, DateTo. My problem is that an append/update query can't find the values in the open Form (frmInvoices) when I specify them as; [Forms]![frmInvoices]![InvoiceNumber] a select query has no problem finding the field values on a form. please help. Aaron Hi Aaron, Could you post the entire code that you are having trouble with? Now it is not possible to see what goes wrong. HJ "Aaron" <aaron@rapid-motion.co.uk> wrote in message news:260d7f40.0408120245.2f3d01f8@posting.google.com... > Hi, > > Thanks for ur help there HJ. > > I know how to do the tasks you specified there. > > I would like for the update query to use field values from some of the > fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, > DateTo. My problem is that an append/update query can't find the > values in the open Form (frmInvoices) when I specify them as; > > [Forms]![frmInvoices]![InvoiceNumber] > > a select query has no problem finding the field values on a form. > > please help. > > Aaron First off, if you are not always using all the parameters specified in your form, then you have to add parameters to your query on the fly. Also, you can't just do something like qdf.SQL = "SE...

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

'THE' PROOF & NEW CHALLENGE : beyond http://1stworks.com much-acclaimed 'breakthrough'binomial QI : Enumerative Combinatorics multinomial UNLIMITED 'nested multiple constraints' lexicographic ranked
All : here is the proof : AMillionRandomDigits.bin (406KB) has now been reduced represented by hundreds of bytes ( in a series of straight forward split smaller blocks around 50-60KB each ) attach one of the blocks ( 1st 59,897 bytes, exact verbatim from AMillionRandomDigits.bin ), of block size 59,897 bytes reduced represented by 59,864 bytes output Index.ind ( 33 bytes less ) from which lossless reconstructed back into exact same verbatim 59,897 bytes : http://www.box.net/shared/static/z9g07upfdk.zip decompressor now being separated from compressor , and will be available to all ASAP. ...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ########################################################################### #define MODULE #define __KERNEL__ #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> /* printk */ #include <linux/fs.h> / #include <linux/errno.h> /* error codes */ #include <linux/types.h> /* size_t */ #include <linux/proc_fs.h> /* proc file system */ #include <linux/fcntl.h> #include <asm/system.h> /* cli, flags */ #include <asm/uaccess.h> /* copy from/to user */ /*Registers to get qadc access*/ volatile unsigned short * qadcmcr = (unsigned short *)0x40190000; volatile unsigned short * qacr0 = (unsigned short *)0x4019000a; volatile unsigned short * qacr1 = (unsigned short *)0x4019000c; volatile unsigned short * qacr2 = (unsigned short *)0x4019000e; volatile unsigned short * qasr0 = (unsigned short *)0x40190010; volatile unsigned short * qasr1...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

Re: '^=' and '~='?
Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ...

'a'..'z'
Is it possible to achieve something like this? switch (mystring.charAt(0)) { case 'a'..'z': // do something break; } "cruster" <cruster@gmail.com> wrote in message news:1151319731.988814.326200@m73g2000cwd.googlegroups.com... > Is it possible to achieve something like this? > > switch (mystring.charAt(0)) { > case 'a'..'z': > // do something > break; > } > There are times when an if statement may be more appropriate ;) Sorry - java is not VB :) -- LTP :) cruster schreef: > Is it possible to achieve somethi...

'!' vs. '.'
Is there an advantage to using the '!' notation to represent form/ control relationships? (eg. Me!text1 vs Me.text1) I am currently using the '.' notation exclusively (for code completion in the VB Editor), but much of the high-quality code that I've seen (in Duane Hookom's Query-by-Form db, for example) uses the other. Here's one opinion for you: http://doc.advisor.com/doc/05352 robert.waters wrote: >Is there an advantage to using the '!' notation to represent form/ >control relationships? (eg. Me!text1 vs Me.text1) > >I am currently using the '.' notation exclusively (for code completion >in the VB Editor), but much of the high-quality code that I've seen >(in Duane Hookom's Query-by-Form db, for example) uses the other. -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200704/1 Here's my $0.02 worth on this. I tend to copy the notation style and naming conventions that I see being used in the Help files. That would be Me![text1] for a control on a form. I am of the belief that this notation explicitly refers to a control itself rather than a field in the form's recordset. Here's an example: I have a parts inventory app that uses a "Line" code, which is usually a 3-character abbreviation for a brand name, and is the na...

'[OFF]' as in 'offensive'???
Hi, given that 'off-topicness' is indicated as '[OT]' and taking a look at those postings that started the threads indicated as '[OFF]' (which may both be seen as being somewhat offensive) may lead to the conclusion that '[OFF]' stands for offensiveness. I don't think that this is the intended meaning so what actually *does* '[OFF]' mean? I never came across that abbreviation before (although I have been around on the USENET for quite some time) but maybe it is worth knowing? Josef 'Jupp' Schugt NOTE: mails >100 KiB are ignored -- German edition of comp.lang.ruby FAQ - http://oss.erdfunkstelle.de/ruby/ Aurox Linux - http://qurl.net/7q | http://qurl.net/7r - Firefox Thunderbird - http://qurl.net/7s | http://qurl.net/7t - Liferea Enigmail - http://qurl.net/7u | http://qurl.net/7v - GnuPG [Josef 'Jupp' Schugt <jupp@gmx.de>, 2004-12-10 23.20 CET] > I don't think that this is the intended meaning so what actually *does* > '[OFF]' mean? Off-topic. ...

Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ mwql: >Hey guys, this maybe a stupid question, but I can't seem to find the >result anywhere online. When is the right time to use 'is' and when >should we use '=='? http://docs.python.org/ref/comparisons.html -- Ren� Pijlman mwql wrote: > Hey guys, this maybe a stupid question, but I can't seem to find the > result anywhere online. When is the right time to ...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

Override 'and' and 'or'
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco Dekker <m.aschwanden@gmail.com> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero__ " __nonzero__( self) Call...

Nvidia's 'NV60' (GT300) apparently uses MIMD architecture to take on Intel's Larrabee and any other challenger
Rumour: Nvidia GT300 architecture revealed Author: Ben Hardwidge Published: 23rd April 2009 How do you follow a GPU architecture such as Nvidia's original G80? Possibly by moving to a completely new MIMD GPU architecture. Although Nvidia hasn=92t done much to the design of its GPU architecture recently - other than adding some more stream processors and renaming some of its older GPUs - there=92s little doubt that the original GeForce 8-series architecture was groundbreaking stuff. How do you follow up something like that? Well, according to the rumour mill, Nvidia has similarly radical ideas in store for its upcoming GT300 architecture. Bright Side of News claims to have harvested =93information confirmed from multiple sources=94 about the part, which looks as though it could be set to take on any threat posed by Intel=92s forthcoming Larrabee graphics processor. Unlike today=92s traditional GPUs, which are based on a SIMD (single instruction, multiple data) architecture, the site reports that GT300 will rely on =93MIMD-similar functions=94 where =93all the units work in MPMD mode=94. MIMD stands for multiple-input, multiple-data, and it=92s a technology often found in SMP systems and clusters. Meanwhile, MPMD stands for multiple-program, multiple data. An MIMD system such as this would enable you to run an independent program on each of the GPU=92s parallel processors, rather than having the whole lot running the same program. Put simply, this could open up the pos...

difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'? I'm thinking not, so perhaps another question, why have both ',' and 'a,'? Thanks Should be the same, in gforth: see , : , here cell allot ! ; ok see a, : , here cell allot ! ; ok On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote: > Small question. In gforth is there a difference between the words ',' and 'a,'? > > I'm thinking not, so perhaps another question, why have both ',' and 'a,'? > > Thanks beeflo <beeflobill@gmail.com> writes: >Small question. In gforth is there a difference between the words ',' and 'a,'? > >I'm thinking not, so perhaps another question, why have both ',' and 'a,'? In Gforth itself, there is no difference. In Gforth's cross compiler, "a," is there for addresses, and "," is there for other cells; addresses can then be relocated when loading the image. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.forth200x.org/forth200x.html EuroForth 2014: http://www.euroforth.org/ef14/ ...

replacement for '{' and '}' ?
I am still playing around with what kind of syntax I would like to mark up my documents. Are there equivalent long substitutes for { and } when they are not used to describe arguments to functions? Something like \begin{group} and \end{group}. In other words, if I could force myself to write, say, \begin{group} \it ... \end{group} instead of {\it ... }, then I believe I could identify from the markup context what is an argument that belongs to a just invoked macro and what is text. {Of course, in this context, \textit{...} would be better.} No more ambiguity whether a in \myfunction{a} is an argument or just text. Is there a way to make latex barf when it sees an ordinary '{' in text, rather than \begin{group}, but not barf when I want it (to denote macro arguments)? Regards, /iaw On Aug 16, 6:01=A0pm, "ivo...@gmail.com" <ivo...@gmail.com> wrote: > Is there a way to make latex barf when it sees an ordinary '{' in > text, rather than \begin{group}, but not barf when I want it (to > denote macro arguments)? What do you mean exactly? I don't understand. Do you have in mind your- to-be-new-syntax or just regular latex? Cheers, Tomek ivowel@gmail.com wrote: > I am still playing around with what kind of syntax I would like to > mark up my documents. > > Are there equivalent long substitutes for { and } when they are not > used to describe arguments to functions? Something like \begin{group} > and \end{gr...

Web resources about - Z80 Programmers' Challenge - comp.sys.sinclair

Resources last updated: 3/28/2016 5:38:25 PM