Jump to content
IGNORED

Supernotes


GDMike

Recommended Posts

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! 

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  • Thanks 1
Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

 

Link to comment
Share on other sites

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 by GDMike
Link to comment
Share on other sites

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 by GDMike
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...