-
Posts
5,616 -
Joined
-
Last visited
About Lee Stewart

Profile Information
-
Gender
Male
-
Location
Silver Run, Maryland
Recent Profile Visitors
20,858 profile views
Lee Stewart's Achievements
Quadrunner (9/9)
4.4k
Reputation
-
Generally, you want the termination resistor pack on the drive at the physical end of the cable, regardless of its number. ...lee
-
Effectively, you have only a 5x7 matrix for characters in Text mode because you want a 1-pixel character separation for both columns and rows. Though you can certainly define characters to fill the 6x8 matrix, they will run together if you do. Though you lose the rightmost 2 pixels of each character, you must define each character as an 8x8 matrix in the character pattern table. And, indeed, the effective screen is only 240 pixels wide and, I would guess (others will know better than I), centered with an unavailable 8-pixel border on each side. ...lee
-
Being more used to Forth and Assembler, I totally forgot about that. ...lee
-
How is the screen location passed to Basic? If as a floating point number, then 100 ROW = INT(LOC/32) 110 COL = LOC - ROW * 32 ...lee
-
Dividing the number of ticks by 60 gives you seconds, not frames (as you first posted). In the above post, your second "minutes" line is 19884 hours, which divided by 24 gives you 828.5 days. ...lee
-
I have not yet examined your code, but, if you are ticking a 32-bit timer 60 times a second, you get 828.5 days before it rolls over! ...lee
-
The absolute value (saving sign) of the result of a radix-100 calculation is normalized by checking the mantissa for leading zero bytes (radix-100 digits) and shifting left, one byte at a time, until the lead byte is nonzero. The exponent is adjusted to make that lead byte the sole, non-fractional, radix-100 digit. If all mantissa bytes are zeros, the first word (sign/exponent byte and the first mantissa byte) is zeroed. Nonzero results are rounded, if necessary. If the result is negative (indicated by saved sign) the first word is negated. ...lee
-
What's keeping you from running the interpreter from cartridge ROM? ...lee
-
Generally, for the Guidry/Fetzner-type cartridges, EPROMs double in size for the next size up. This would mean that the next size beyond a 32 KiB EPROM (4 8-KiB banks) would be a 64 KiB EPROM (8 8-KiB banks), which should handle all you are currently looking to throw at it. ...lee
-
Yeah... CREATE in Forth83 and beyond is virtually the same as VARIABLE , with the difference that VARIABLE reserves and zeroes one cell for the parameter field. Words created with both of those defining words leave the parameter field address of the defined word on the stack when executed. Whereas, in figForth-based Forths like fbForth, CREATE creates the new word with the same kind of header, viz., no parameter field is reserved. The difference is that fbForth’s CREATE stashes the new word’s pfa into its code field, meaning that, upon execution of the new word, its parameter field (nonexistent, unless you defined it separately) will be executed—not usually what you want to happen when trying to use CREATE on the command line. Furthermore, fbForth’s CREATE sets the new word’s smudge bit ( hides the word from -FIND ). The above two functions of fbForth’s CREATE presume CREATE will only be used by other defining words that will modify the contents of the new word’s code field and toggle its smudge bit before concluding the new word’s definition. fbForth’s VARIABLE differs only in that it expects the initial value of the parameter field on the stack instead of automatically zeroing it. For what it’s worth, here is a definition of CREATE83 for fbForth that will function as the CREATE for Forth83 (and beyond): : CREATE83 <BUILDS DOES> ; That said, we can kill two birds with one stone by using fbForth’s VARIABLE to store the number of entries in TABLE in the first cell and use that in DOIT for bounds checking (the leave-it-to-the-reader poser): : CELLS ( n -- 2n ) 1 SLA ; \ double n (word not yet in fbForth) \ Set up TABLE with count as first word in parameter field followed by \ count cfas to flesh out TABLE. 4 VARIABLE TABLE ] FIZZ BUZZ BLEEP HALT [ : DOIT ( n -- ) DUP 1 < \ n < 1? OVER TABLE @ > \ n > TABLE count? OR ABORT" TABLE range!" \ abort if either test TRUE CELLS TABLE + @ EXECUTE \ execute nth cfa in TABLE ; \ Usage: 1 DOIT 2 DOIT etc. ...lee
-
Actually, for your example hex to match the floating point decimal number following it, the hex should be >40 >0A >14 >1E >28 >32 >3D >0A ...lee
-
Sort of. Hex, as I'm sure you know, has digits that are 4 binary digits each. However, you cannot say this is straight-up binary because the format of a floating point number has specific hex requirements: The exponent must be a power of 16. The hex mantissa must be a hex fraction, normalized to have a nonzero first hex digit. #2 means that there may be up to 3 leading zero bits. All that said---yes, it is a binary format. Sorry for all the rambling. ...lee
-
According to this, the largest representable hex number is 0.FFFFFFFFFF16 x 1016+63 , which is ~7.237005610 x 1010+75. The actual precision claimed in another doc above is only 11 decimal digits. Considering that the hex mantissa above is 10 hex digits and that the decimal value (without considering the radix point) is 1099511627775 (which is 13 decimal digits), the possible, extra 2 digits must be swamped enough by rounding/calculation errors to disallow any better precision. ...lee
-
First of all, MPY is much more expensive than CLR---not sure it would be better. Secondly, if your code would actually run, it won't work because the last statement has no effect on FAC+6. The autoincrement occurs after the MPY. This should do it: MPY *R3+,*R3+ More importantly (per @Asmusr’s comment below), it will not work because the destination operand must be a register proper. ...lee
