apersson850 Posted June 1, 2022 Share Posted June 1, 2022 1 hour ago, GDMike said: I'm reading it with and without my glasses. Confuse, not diffuse. What we all meant is that selecting an abbreviation which easily can be misunderstood as a hexadecimal constant is to ask for a misunderstanding, now or later. 2 Quote Link to comment Share on other sites More sharing options...
Willsy Posted June 1, 2022 Share Posted June 1, 2022 13 minutes ago, apersson850 said: Confuse, not diffuse. What we all meant is that selecting an abbreviation which easily can be misunderstood as a hexadecimal constant is to ask for a misunderstanding, now or later. This is true. You need helpful labels. In the TurboForth source you will find labels such as 'tilt'1 and 'ohshit'. These are very helpful. Well, at least to me. YMMV 1 You have to be a certain age to know the significance of tilt. 3 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 1, 2022 Author Share Posted June 1, 2022 (edited) So "helpful" meaning no hex number characters. Today, everything is lol, so I shouldn't L0L hmm ? so 0nce isn't allowed, that's with a zero btw. Ehhh, I'll just make sure I note things in my notes. But V3ry interesting to see that. And do my best, but I have soooo many labels that use numbers, like start1, go3 I'll just keep notes. I have labels like APFR and AFPR back to Back too. I'm a walking nightmare of labels. Edited June 1, 2022 by GDMike 2 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 1, 2022 Share Posted June 1, 2022 6 hours ago, GDMike said: I'm a walking nightmare of labels. Well—You could switch to @ralphb’s xas99 so you are not limited to 6-character labels! ...lee 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 1, 2022 Author Share Posted June 1, 2022 (edited) 1 hour ago, Lee Stewart said: Well—You could switch to @ralphb’s xas99 so you are not limited 6-character labels! ...lee Interesting. I'm not familiar with it, but maybe I ought to be. Naaaaaa....I'm going to finish SNP 3 and get back to Forth, like I said I would. Just needed to get past this memory store issue I was having. But, I'll definitely do that for a future assy project. But I'm surely missing C @ 1 + . About right now. Oops, I said "C".., C is not hex in this situation either. Just kidding around... Edited June 1, 2022 by GDMike 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted June 2, 2022 Share Posted June 2, 2022 (edited) Joke about it as much as you like, but it's a fact. If you use names that confuse other people today, they'll confuse yourself in a few months. It's not that it's "not allowed". It's just a question about making life as easy as possible. If you have a procedure that changes colors from higher to lower intensity ones, you may call it by BL @FADE. Although FADE is a valid hex number, there's no likely risk of confusion. But BL @F0DC may be misread to mean BL @>F0DC, so there has to be a good reason for choosing that as a label name. It's just like with comments. Some people don't comment at all. Not very helpful, neither to others nor to themselves, a few months later. Some people comment a lot, but to no avail. INCT R2 ;Increment register 2 by two That's pointless. The comment is about what, not why. Anyone who knows coding can see that R2 is incremented. Those who can't don't read code anyway. It has a point teaching people assembly programming only, but that's not the idea when you write a program. INCT R2 ;Advance index in list of valid numbers found Now whoever reads the comment can see why the instruction is there, not just a repeat of what it does. Edited June 2, 2022 by apersson850 3 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted June 2, 2022 Share Posted June 2, 2022 16 hours ago, GDMike said: Ehhh, I'll just make sure I note things in my notes. OK! You can make all the notes you want. But, hear me now... and believe me two weeks from now on a Tuesday! You can play all the kids games you want, but if you grow-up and stop doing it like a girly-man... We wont have to come-over-there, and PUMMEL you all over your own thread with our big gigantic muscular arms! Embarrassing you, while everybody watches! 3 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 2, 2022 Author Share Posted June 2, 2022 (edited) 5 hours ago, apersson850 said: Joke about it as much as you like, but it's a fact. If you use names that confuse other people today, they'll confuse yourself in a few months. It's not that it's "not allowed". It's just a question about making life as easy as possible. If you have a procedure that changes colors from higher to lower intensity ones, you may call it by BL @FADE. Although FADE is a valid hex number, there's no likely risk of confusion. But BL @F0DC may be misread to mean BL @>F0DC, so there has to be a good reason for choosing that as a label name. It's just like with comments. Some people don't comment at all. Not very helpful, neither to others nor to themselves, a few months later. Some people comment a lot, but to no avail. INCT R2 ;Increment register 2 by two That's pointless. The comment is about what, not why. Anyone who knows coding can see that R2 is incremented. Those who can't don't read code anyway. It has a point teaching people assembly programming only, but that's not the idea when you write a program. INCT R2 ;Advance index in list of valid numbers found Now whoever reads the comment can see why the instruction is there, not just a repeat of what it does. I've seen comments doing exactly that, ; incrementing 2 And I got caught thinking that is how it's done. But then, I've never asked directly how one writes their notes. And when I started doing that same type of remark, I questioned myself and saying, wth. Everyone can already understand this because of the instruction. So I started keeping separate notes, but mainly because I wanted more room to write because I'm using the e/a editor and it can't store a lot in ram So i use, (plugin), SNP! in it's fine condition and productivity. It can handle lots of pages.. and it's stopwatch fast.. whatever that means, anyway, Im glad to hear that I shouldn't be doing ; incrementing 2 That change up gives me relief really. Thankfully I've not been bitten by the "what's going on" WGO bug. My joking really meant I got ya..10-4, copy that, affirmative and ok. If I hadn't mentioned it I think you would think I didn't. But I appreciate the tip. I gotcha ? And for the Forth programmers.. Forth's use of "\" comment, for me anyway, gets worse than assembly. For one thing I always feel like I should be on a budget with my coding in Forth because of space for coding. Depending on how many blocks you create to start with I find myself looking over my shoulder as to, how NOT to take up too much space for comments. How much space do you allot between code and comment's? Do you just leave out simple word def altogether? Do you place a comment on every line? I find it very difficult placing comments in Forth. So I completely leave them out and explain each word and "section" I'm working on in a complete different file. Because in Forth you just have such a small area for both. Thx for the tips on commenting Edited June 2, 2022 by GDMike 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted June 2, 2022 Share Posted June 2, 2022 (edited) 55 minutes ago, GDMike said: And for the Forth programmers.. Forth's use of "\" comment, for me anyway, gets worse than assembly. For one thing I always feel like I should be on a budget with my coding in Forth because of space for coding. Depending on how many blocks you create to start with I find myself looking over my shoulder as to, how NOT to take up too much space for comments. How much space do you allot between code and comment's? As much as you need to understand the code later. Quote Do you just leave out simple word def altogether? Do you place a comment on every line? I find it very difficult placing comments in Forth. So I completely leave them out and explain each word and "section" I'm working on in a complete different file. Because in Forth you just have such a small area for both. Thx for the tips on commenting Most hobby Forth's didn't do this but the pro systems that used BLOCKs back in the old days normally had "shadow blocks". Shadow blocks were used for comments and notes about the code in a block. Some of the systems put shadow blocks a fixed number of blocks away for example CODE in block 1 had a shadow at block 301, block 2 had a shadow at 302 etc. The editor had a key to let you switch instantly between code block and shadow block to see/edit the comments. You can do the shadow blocks on TI-99. You just do it manually. (or add a shadow block offset and hot key to the editor) Today Forth systems mostly use a text editor for source code like any other language and Forth compiles directly from text files. The pressure for the commercial companies was too great to resist. But on a small system BLOCKs are still the easiest to implement and give you source code storage and virtual memory for programs all in one structure. Edited June 2, 2022 by TheBF typo 2 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 2, 2022 Author Share Posted June 2, 2022 2 minutes ago, TheBF said: As much as you need to understand the code later. Most hobby Forth's didn't do this but the pro systems that used BLOCKs back in the old days normally had "shadow blocks". Shadow blocks were used for comments and notes about the code in a block. Some of the systems put shadow blocks a fixed number of blocks away for example CODE in block 1 had a shadow at block 301, block 2 had a shadow at 302 etc. The editor had a key to let you switch instantly between code block and shadow block to see/edit the comments. You can do the shadow blocks on TI-99. You just do it manually. (or add a shadow block offset and hot key to the editor) Today Forth systems mostly use a text editor for source code like any other language and Forth compiles directly from text files. The pressure for the commercial companies was too great to resist. But on a small system BLOCKs are still the easiest to implement and give you source code storage and virtual memory for programs all in one structure. That's another way for sure. I'm thinking, maybe I'll use half a block to code and the bottom half for comments. Thx for explaining Quote Link to comment Share on other sites More sharing options...
+TheBF Posted June 2, 2022 Share Posted June 2, 2022 The advantage of shadow blocks is that you don't need comment characters. They are never loaded, just read by humans. I am partial to text files now and so Camel99 followed the modern trend and made BLOCK a loadable option. 2 Quote Link to comment Share on other sites More sharing options...
Willsy Posted June 2, 2022 Share Posted June 2, 2022 In Forth, you shouldn't need comment for your high-level code - it should be relatively self-documenting. It's the lower level routines that get down to the meat and potatoes that start juggling things on the stack etc; that's where it can get hairy! I just had a look a look in the TF source code for example of 'good' commenting style. It's subjective, I guess, but I think the following is okay. This is the source for the word EXPECT which gets input from the keyboard (like TI Basic's INPUT command): ; EXPECT addr +n -- M,83 ; Receive characters and store each into memory. The transfer begins at addr ; proceeding towards higher addresses one byte per character until either a ; "return" is received or until +n characters have been transferred. ; No more than +n characters will be stored. ; The "return" is not stored into memory. ; No characters are received or transferred if +n is zero. ; All characters actually received and stored into memory will be displayed, ; with the "return" displaying as a space. See: SPAN "9.5.2 EXPECT" expcth data copywh,6 text 'EXPECT' expect data $+2 clr @in ; clear >IN variable clr r14 ; counter for number of characters ; *actually* in the buffer mov *stack+,r13 ; pop length in r13 mov *stack+,r10 ; pop address address in r10 mov r13,r13 ; check length jeq zchars ; quit if 0 characters requested expnxt bl @kscn ; scan keyboard (wait for a keypress) ; ascii code returned on the stack ; check for enter key... c *stack,@datCR ; compare to carriage return (enter key) jeq exp2 ; exit routine if enter was pressed ; ; check for backspace key... c *stack,@lit8+4 ; compare to backspace key jne skipbs ; skip if backspace not pressed inct stack ; remove backspace from stack mov r14,r14 ; check if anything in the buffer jeq expnxt ; tib is empty, ignore... ; do backspace... bl @ccp ; compute cursor position li r1,>2000 ; load a space character bl @vsbw ; erase the cursor mov @scrX,r0 ; get current x position jne back1 ; if x>0 we don't need to move up one line mov @xmax,@scrX ; move to end of line dec @scrX ; correct X dec @scrY ; up one screen line mov @scrY,r0 ; check y jlt bumpY ; if <0 then reset to 0 jmp back2 back1 dec @scrX ; move back one character back2 dec r14 ; decrement buffer index pointer dec r10 ; decrement buffer position jmp expnxt ; get another keypress bumpY inc @scrY ; prevent Y from going <0 jmp back2 ; process keypress... skipbs dect stack ; new stack entry mov @2(stack),*stack ; duplicate value on stack for EMIT bl @emit_ ; call emit (which may/may not call SCRLUP) swpb *stack ; shift ascii code into MSB mov *stack+,r1 mov r10,r0 inc r10 bl @vsbw0 inc r14 ; increment 'number of characters in buffer so far' ; counter c r14,@tibsiz ; do we have #TIB characters in the buffer? jeq exp1 ; if so, exit the routine c r13,r14 ; have we got 'length' characters? jne expnxt ; read another key if not exp1 mov r14,@_span ; move character count into _span b @space1+2 ; type a space to the console and exit exp2 inct stack ; pop ascii 13 off the stack jmp exp1 3 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 2, 2022 Author Share Posted June 2, 2022 Yes, it's really plain and readable 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted June 2, 2022 Share Posted June 2, 2022 3 hours ago, Willsy said: In Forth, you shouldn't need comment for your high-level code - it should be relatively self-documenting. Yes, the "what". Perhaps still not the "why". 3 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted June 2, 2022 Share Posted June 2, 2022 Transcendental music break?! Spoiler 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 4, 2022 Author Share Posted June 4, 2022 (edited) SNP work continuing tonight. Edited June 4, 2022 by GDMike 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 6, 2022 Author Share Posted June 6, 2022 Should I use my gas card now or later Quote Link to comment Share on other sites More sharing options...
Reciprocating Bill Posted June 7, 2022 Share Posted June 7, 2022 Vis the SuperCart, can I assume that it will function OK with the battery removed? I'd prefer it start from a completely zero'd out state with each start up - and don't need it to retain any data. Sometimes it gets itself into a funky state and takes some convincing to get back to normal functioning (e.g. having Cortex Basic write zeros to every byte). It would be simpler if just powering down would do that. 1 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 7, 2022 Author Share Posted June 7, 2022 (edited) Yes, I use mine all the time with no battery. But I'm not sure what state that the computer will place the ram at boot. You might want to clear it before using anyway. But regardless, I have a couple programs that read and write and I don't see any weirdness. Edited June 7, 2022 by GDMike 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 7, 2022 Author Share Posted June 7, 2022 (edited) EA option 3, SC program name start to run it (Note, I never quite finished this, but it's useable as is). SC Edited June 7, 2022 by GDMike 1 Quote Link to comment Share on other sites More sharing options...
Reciprocating Bill Posted June 7, 2022 Share Posted June 7, 2022 That's handy. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 8, 2022 Author Share Posted June 8, 2022 I'm a little sidetracked again. Looks like the Toyota rack and pinion we put in last month has sprung a leak in a seal. So I'm helping him replace it, again. And I lost a hard drive at the same time. So I'm restoring data, Just time consuming stuff. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted June 8, 2022 Share Posted June 8, 2022 Life happens while we are making plans... Good luck with the leaky seal. 1 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 8, 2022 Author Share Posted June 8, 2022 (edited) 23 hours ago, TheBF said: Life happens while we are making plans... Good luck with the leaky seal. Thx Edited June 9, 2022 by GDMike 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 9, 2022 Author Share Posted June 9, 2022 (edited) I tried using DBF0(R5) and changing the value of R5 as a pointer during an incrementing of R5 for 4 increments pushing a different value into DBF0, which is a memory EQU label. But when I tested to view the memory addresses manually, they did not show the values that I stored at DBF0 + the value of R5, or the next address of DBF0 which is pointing to>79D6, I dunno why. But I have an idea to just move the 4 bytes that happen Prior to my larger loop that isn't mentioned here, straight to high ram. The only difference here is that I was gonna do the move after gathering the complete loop iterations, but I can handle it this way. Edited June 9, 2022 by GDMike Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.