Asmusr Posted June 9, 2022 Share Posted June 9, 2022 This doesn't look right: MOV R4,@DBF0+R5+3 What you probably want is: MOV R4,@DBF0+3(R5) 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 9, 2022 Author Share Posted June 9, 2022 Just now, Asmusr said: This doesn't look right: MOV R4,@DBF0+R5+3 What you probably want is: MOV R4,@DBF0+3(R5) correct, i was in the middle of trying to determine how to use (R5) in this case. But I really like what you did here, with MOV R#,@DBF0+3(R5) thats the ticket! Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 9, 2022 Author Share Posted June 9, 2022 Just now, GDMike said: correct, i was in the middle of trying to determine how to use (R5) in this case. But I really like what you did here, with MOV R#,@DBF0+3(R5) thats the ticket! so why didnt MOV R#,@DBF0(R5) work? Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 9, 2022 Author Share Posted June 9, 2022 Hahaha... anyway.. don't answer that. I can see now the error. Thank you for clarifying. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted June 9, 2022 Share Posted June 9, 2022 1 minute ago, GDMike said: so why didnt MOV R#,@DBF0(R5) work? MOV R4,@DBF0+3(R5) won't work either if the value of @DBF0 plus the value of R5 plus 3 is odd. Then it will write both to the even address before and to the odd address. You should always use MOVB if you just want to write one byte. 1 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted June 9, 2022 Share Posted June 9, 2022 Using a LABEL while attempting to understand an addressing mode that is unfamiliar, seems needlessly complicated. Moreso if one is uncertain of how LABELs are used either. Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted June 9, 2022 Share Posted June 9, 2022 I think your time might be better invested in, setting up an explicit example, with a concise context. Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 9, 2022 Author Share Posted June 9, 2022 2 hours ago, Asmusr said: MOV R4,@DBF0+3(R5) won't work either if the value of @DBF0 plus the value of R5 plus 3 is odd. Then it will write both to the even address before and to the odd address. You should always use MOVB if you just want to write one byte. Yes. This should work out. Thanks for catching this blip of mine. Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 9, 2022 Share Posted June 9, 2022 2 hours ago, GDMike said: i was just going to intentionally write to MSB and not care about the odd byte because I was hoping to write to the MSB of the even byte in each case, so I knew that part, BUT when I read the locations manually I didnt get the MSB of what i wrote. possibly I wasnt reading the address correctly as well. But i see what your saying here I am not sure you understand. As Rasmus said, MOV knows nothing about odd addresses. You may think you are passing an odd address to MOV, but the least significant bit (LSb) of the address is either not read or it is masked off, that is, MOV only looks at the high 15 bits of the address because it only cares about moving words (2 bytes) to word addresses (even byte addresses). ...lee 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 3 hours ago, Lee Stewart said: I am not sure you understand. As Rasmus said, MOV knows nothing about odd addresses. You may think you are passing an odd address to MOV, but the least significant bit (LSb) of the address is either not read or it is masked off, that is, MOV only looks at the high 15 bits of the address because it only cares about moving words (2 bytes) to word addresses (even byte addresses). ...lee Ahh. I thought I'd be writing MSB of an address with a character and then garbage to the LSB and figuring that the LSB was the next address as the odd address, as in >79D6 And>79D7. Ok.. that's not happening. Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 10, 2022 Share Posted June 10, 2022 6 hours ago, GDMike said: heres the file the issue is located at label INT2, this is where the main loop will be. in the file im using MOV R0,@DBF0+R5+ a number, but was looking at trying to do a (R5) as my address pointer, i just didnt change it in this file... EXTR 10.38 kB · 3 downloads Before I can do much with the above code, I will need to know precisely what is stored at the buffer pointed to by DBF0 (>7D9A): It appears you are storing just 5 items of information. Correct? Whatever is stored, does any datum require more than 1 byte? It appears there is one data block of the above for each form/database field. Correct? Does location NFS store the current field number and is it used as an offset into the buffer at >7D9A? ...lee Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 7 minutes ago, Lee Stewart said: It appears you are storing just 5 items of information. Correct? I want to store 1 byte to >79D6. This is represented by R0 as a position on the screen. A number between 1 and 1920 decimal. Then I'll store again to >79D6 + 34, (I just don't have a calc in front of me), and I'll do this repeatedly for 17 times over thru a loop represented by R5. As R5 starts out as zero, then after the first loop it becomes 34. Next, I'll answer the next question. One sec... Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) 26 minutes ago, Lee Stewart said: Whatever is stored, does any datum require more than 1 byte? The next 3 bytes are supposed to end up at >79D7, >79D8 and >79D9. They are in order, a character, either a "B" or a blank character, nothing else. The next value to be pushed to>79D8 is a character, either a "C" or a "V" or a "D" or a "T". And these will be stored at >79D7-9 and again at the same address plus 34, whatever those addresses are., Supposed to be calcd by R5. Next value is a value between 1 and 30 as byte 4. Edited June 10, 2022 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 18 minutes ago, Lee Stewart said: It appears there is one data block of the above for each form/database field. Correct? Yes, I'm doing a DBF0 EQU >79D6 as the starting address. Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) 23 minutes ago, Lee Stewart said: Does location NFS store the current field number and is it used as an offset into the buffer at >7D9A? Not really. NFS keeps track of the address to push my 4 values and then jumps to the address plus 34 bytes inorder to place the next 4 values thru a loop after I gather those new values by reading the screen, coming up with the values and making sure their placed in MSB of the proper register inorder to do a MOVB. I'll end up reading the screen 17 times MAX and I send an error if the user placed too many fields(meaning more than 17) and another error if only 1 field is defined. Edited June 10, 2022 by GDMike Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 10, 2022 Share Posted June 10, 2022 8 minutes ago, GDMike said: I want to store 1 byte to >79D6. This is represented by R0 as a position on the screen. A number between 1 and 1920 decimal. You will need 2 bytes (1 word) to store a number greater than 255. 4 minutes ago, GDMike said: The next 3 bytes are supposed to end up at >79D7, >79D8 and >79D9. They are in order, a character, either a "B" or a blank character, nothing else. The next value to be pushed to>79D8 is a character, either a "C" or a "V" or a "D" or a "T". And these will be stored at >79D7-9 and again at the same address plus 34, whatever those addresses are., Supposed to be calcd by R5. What is stored at >79D9? And, by the way, your code makes DBF0 >79DA, not >79D6. ...lee 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 10, 2022 Share Posted June 10, 2022 3 minutes ago, GDMike said: NFS keeps track of the address to push my 4 values ... What does “address” mean exactly? ...lee Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 Once I gathered all 17 pieces of those 4 bytes grouping, I'll push it to a SAMs bank that I've got waiting and this will be a 534 byte Field, 4 header bytes, a reserved space of 30 bytes for input and a 512 byte space reserved for a Field for user as a note field. This is the complete field data block. Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 6 minutes ago, Lee Stewart said: You will need 2 bytes (1 word) to store a number greater than 255. What is stored at >79D9? And, by the way, your code makes DBF0 >79DA, not >79D6. ...lee Right, so I'll just use a complete word to move holding that value. >79DA is fine, as long as I can gather enough space to capture Prior to hitting >7FFF. Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 6 minutes ago, Lee Stewart said: What does “address” mean exactly? ...lee Obviously, my screen position won't fit in one address so it'll have to occupy address >79D? And the next address. Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 Just now, GDMike said: Obviously, my screen position won't fit in one address so it'll have to occupy address >79D? And the next address. Memory location. Ill need 534 bytes reserved in the upper >7000 space and prior to>7FFF. And as close to the upper address as possible. Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 10, 2022 Share Posted June 10, 2022 1 minute ago, GDMike said: Obviously, my screen position won't fit in one address so it'll have to occupy address >79D? And the next address. So, “address” actually means screen position (VRAM address) of a Text80 screen, correct? ...lee 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) 1 minute ago, Lee Stewart said: So, “address” actually means screen position (VRAM address) of a Text80 screen, correct? ...lee Nope. Storage location between>79D? And>7FFF. Edited June 10, 2022 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) I'm using a question mark to represent that I can be flexible as long as it all fits prior to>7FFF Edited June 10, 2022 by GDMike Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 10, 2022 Share Posted June 10, 2022 1 minute ago, GDMike said: Nope. Storage location between>79D? And>7FFF. So NFS is an offset into >79DA? ...lee 1 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.