Re: goto: it's conceded
- Posted by Jason Gade <jaygade at yahoo.co?> Jun 03, 2008
- 662 views
Kat wrote: > > Jason Gade wrote: > > > > Kat wrote: > > > > > > Derek Parnell wrote: > > > > > > > > Kat wrote: > > > > > > > > > What is the depth limit to nested for/while loops in Eu? > > > > > > > > I think it is only limited by available memory. There is no hard-coded > > > > limit. > > > > > > When you say "available memory", would that be 1Kbytes local stack space > > > per > > > procedure, or 64k global stack space, or the 2 gigabytes the OS will let > > > the > > > program have? Or somewhere in between that's undefined? > > > > > > Yes, real world, i hit TurboPascal's stack limit with nested loops. > > > > > > Kat > > > > Hmm. Not sure where the 1K and the 64k numbers came from, but I don't think > > that Euphoria's loops, at least in the interpreter, rely upon the machine > > stack. > > > > So I choose what's behind door number three -- the total process memory. > > > > I thought I had seen the 262144 number in some build files, but I couldn't > > find > > it when researching your answer. I definitely saw the numbers 49152 and > > 131072 > > in there though... > > Everyone who has done machine coding on a C-64 knows 49152 is a warm reboot, > so that's bad, and it's how much ram in a C-128..... and 131072 is how many > processors in a Blue Gene/L superputer.. I don't know, perhaps Euphoria was > meant to run on these computers too, and it's being withheld from us? > > Kat Heh. Actually, 49152 was RAM masked by ROM that could be switched in and out and was therefore a popular location for user machine code. You had to diddle locations 0 and 1 to switch the I/O registers correctly. (Edit: looked it up -- 49152 - 53247 was RAM. It was 40960 to 49152 which was BASIC ROM mapped over RAM.) How much ram in a C-128 was 131072 but I think it was banked (memory fails now!) Plus it had an 8502 and a Z80 processor! Man, I was so envious of my friends who had one. I still remember poke 53280,0 poke 53281,0 to change my background to black on the C64. Of course, the C64's stack was only 256 bytes, stored from locations 256-511 (backwards, of course!) Another popular location for small machine language programs was from 828 to 1019 which was the cassette tape buffer. But yeah, now that I think about it, I think I remember that sys 49152 did a warm reset unless that location was over-written. Ah, those were the days! (Yes, I had too look up some things to jog my memory). -- A complex system that works is invariably found to have evolved from a simple system that works. --John Gall's 15th law of Systemantics. "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.