Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/22/05 08:24
Modified:
  03/22/05 08:26

Read: times


 
#90215 - well well
Responding to: ???'s previous message
Oleg,

- "direct write" has an advantage of that "hacks" can be performed without notice of the controller so variables which were not intended to be parameters could be changed too (we actually made use of this)
- we don't have 256 bytes for relocation table in the 4051 and there is no n051; n>4 :-) (except for modules, which are definitively far from being low cost); otherwise we perhaps would have the space to implement the tables required for implementing "proper packets"
- we perform no "sanity check"; in case of "network error" even for a "standard packet", setting proper parameters to improper value can bring the "gadget" down immediately - or even worse, it will continue operationg erratically. In the network, we use HDLC-like framing, 16-bit CRC, strong packet type/length check; for this type of "dangerous" packet we use scrambling and another 16-bit CRC. I think, this is a reasonable level of paranoia to rule out any "network error".

Yes, the xrl r1,#data is an error, I discovered it but it was too late to edit it. Of course, this is not the real code, no copy/paste, but simplified for the given case, sorry.

You are right if there are provisions to check then they should be used. I am simply lasy in this respect (I even don't know all the possibilities of the '51 assemblers, as I '51 quite rarely); I rather try to document the code as well as possible. If I write "2 bytes left" and even put the positions, where; and also write a comment "3C-3F" and "40-5F" next to the "definition" of the variable, assuming a literate programmer :-) he wouldn't try to squeeze an another byte in between...
The set of definitions is a bunch of EQUs and you see them all at once on a single screenful and it is quite obvious what space is occupied and what is empty.

My only point was, that there ARE reasons to use absolute variable/symbol position, so while this practice should perhaps be discouraged, it should not be strictly rejected.

Jan


PS. Gosh, this is good, to express my agreement I needed so much space, shouldn't I rather say "Exactly so"? :-)


List of 21 messages in thread
TopicAuthorDate
initializing SP to 7FH            01/01/70 00:00      
   why?            01/01/70 00:00      
      To Oleg & Russell            01/01/70 00:00      
         To Mehdi            01/01/70 00:00      
         To Mehdi            01/01/70 00:00      
            why not            01/01/70 00:00      
               for example, please            01/01/70 00:00      
                  Oleg, why I do similar            01/01/70 00:00      
                  here they are            01/01/70 00:00      
                     well            01/01/70 00:00      
                        well well            01/01/70 00:00      
                           well, well - done            01/01/70 00:00      
                     tight SRAM - use C            01/01/70 00:00      
                        - or assembler            01/01/70 00:00      
   Stack pointer            01/01/70 00:00      
   external stack            01/01/70 00:00      
      why not?            01/01/70 00:00      
         SDCC            01/01/70 00:00      
   Re:initializing SP to 7FH            01/01/70 00:00      
   very old assemblers only            01/01/70 00:00      
      Let the assembler do the work!            01/01/70 00:00      

Back to Subject List