BASIC operators. How many bars?

ZXNet echo conference «code.zx»

From van Yu Shinn To All 5 August 2006

Hello, All Everyone knows how many clock cycles machine commands take. How many clock cycles do BASIC operators take? Where can I read it?

From Gavrilov Vitaly To All 7 August 2006

Hello jdigreze jdi> I don’t know where to read it, but it’s different every time ;) jdi> Well, everything related to arithmetic will depend on jdi> initialization of variables and calculator. Not only with arithmetic. If you look at the list of calculator commands, you can see that working with strings and other calculations also fit there.

From Kirill Frolov To All 7 August 2006

Hello, captain cobalt cap> How many clock cycles do BASIC operators take? Where to read? Much and more. A typical operator is a few ms. I don’t know where to read it except to measure on your own.

From rasmer To All 14 August 2006

Hello, captain cobalt cap> Everyone knows how many cycles machine commands take. cap> cap> How many clock cycles do BASIC operators take? Where to read? You're a pervert...

From Alex Astafiev To All 22 August 2006

Hello, captain cobalt In the branded Spectrum basic, as far as I remember (after all, about 13 I didn’t write anything on it :)), there is one unpleasant thing - BASIC moves very slowly through the lines, it is looking for the next subject execution line. that is, it starts in memory from the beginning of the BASIC program, and Iterates through the lines until it finds the one it needs. This is why, by the way, large “commercially serious” BASIC programs strived to write in such a way that each line contained as many operators as possible BASIC - like giant strings-pieces. .. The execution of BASIC operators varies greatly. Especially the brakes start there, where the internal Baysky calculator calculates something using other “words” calculator and using Chebyshev polynomials (some kind of sine or some other function). You look at the book by O'Hara and Logan (commented sources of the 48th firmware) - there you can get an idea what happens inside BASIC...

From Nikolay Merezhko To All 13 September 2006

Hello, captain cobalt cap> Everyone knows how many cycles machine commands take. cap> cap> How many clock cycles do BASIC operators take? Where to read? In my opinion, it doesn't matter. For self-education only. I'm already convinced that To write something worthwhile, you need to study assembler. The rest are either slowing down or optimization suffers (read “also slows down”). But this is my personal opinion... :smile:

From Alex Astafiev To All 14 September 2006

Hello, fenix 10 PAUSE 1; BORDER; 0 : BORDER 1 : BORDER 2 : BORDER 3 : BORDER 4 : BORDER 5 : BORDER 6 : BORDER 7 : GO TO 10

From Alexandr Sinyakov To All 14 September 2006

Hello, captain cobalt > 10 PAUSE 1; BORDER; 0 : BORDER 1 : BORDER 2 : BORDER 3 : BORDER 4 : > BORDER 5 : BORDER 6 : BORDER 7 : GO TO 10 border consumes >5300 clock cycles??? (bandwidth=3 lines=24 lines=24*224=5376 beats). OMG!!! Where is this native... ld a,4 out (254),a

From Pavel Fedin To All 27 December 2006

Hello, SAM style SAM> border consumes >5300 clock cycles??? (bandwidth=3 lines=24 SAM> lines=24*224=5376 clock cycles). OMG!!! SAM> Where is this native... SAM> ld a,4 SAM> out (254),a Well, first of all, BORDER n is not only OUT (#FE), A. It is also a shading of it the color of the bottom of the screen (which is the command line area). And this is much worse there will be.

From Sergey Gordeev To All 27 December 2006

Hello, SAM style There is a BASin emulator that has a function that draws some diagram, so to speak, for each operator its own column, it is clearly visible where the program flies by, and where it slows down for calculations

From Alexandr Sinyakov To All 27 December 2006

Hello Sonic Son> Well, first of all, BORDER n is not only OUT (#FE), A. It is also Son> coloring the bottom of the screen (which is the command area Son> lines). And this will be much worse. Painting and cleaning the lower part occurs when something is put out there. Himself border does not paint over it (make border 0 : pause 0). But to search for an operator It really takes a lot in a BASIC program line. Plus another number conversion through a slow calculator.

From Yuri Potapov To All 27 December 2006

Hello, SAM style SAM> border consumes >5300 clock cycles??? (bandwidth=3 lines=24 SAM> lines=24*224=5376 clock cycles). OMG!!! SAM> Where is this native... SAM> ld a,4 SAM> out (254),a SAM> ... and write OUT(254),4 religion doesn't allow author? :)

From poisoned cyberjack To All 28 December 2006

Hello, SAM style And in BASIC, the execution time of a command depends on the line number in the program - that is, the farther from the beginning, the longer the “operator” takes to execute...

From Roman Dubinin To All 28 December 2006

Hello, captain cobalt cap> Everyone knows how many cycles machine commands take. cap> cap> How many clock cycles do BASIC operators take? Where to read? Gee! So many. What killed me on the spot was that the output of symbols in a loop is felt eyes :v2_laugh; Somewhere; I saw in a smart book: 1) Basik is a language for morons 2) Pascal is a language for suckers 3) C is a language for professionals 4) Assembler - for maniacs ;)

From Slavik Tretiak To All 28 December 2006

Hello Romanich BASIC is definitely a drag. because I once wrote demos in BASIC, so, one point can be drawn into a frame. two points - only if there are no strong calculations. three dots - and everything slows down :) so fk0 wrote correctly about how many cycles operators take BASIC - "Lots and more"