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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/18/06 04:31
Read: times


 
#122532 - This or that?
Responding to: ???'s previous message
This doesn't work:
                $NOMOD51
                #include <reg52.h>
                Declaration    SEGMENT  CODE

                PUBLIC  ...
                EXTRN   ...

                ABC     EQU   20H
                ...

                RSEG    Declaration
                ORG     0000H
                JMP     Init
                ORG     0050H
Init:           ;MAIN LOOP


but this works:
                $NOMOD51
                #include <reg52.h>
                Declaration    SEGMENT  CODE AT 0000H

                PUBLIC  ...
                EXTRN   ...

                ABC     EQU   20H
                ...

                RSEG    Declaration
                ;ORG     0000H
                JMP     Init
                ORG     0050H
Init:           ;MAIN LOOP


So what's the different between the above two segments? How does ORG different from "SEGMENT AT"?

Stanley

List of 13 messages in thread
TopicAuthorDate
Problem using uVision 3            01/01/70 00:00      
   did you switch to C?            01/01/70 00:00      
      assembler only            01/01/70 00:00      
   What if you use uv3 without 'splitting'            01/01/70 00:00      
      it works without "splitting"            01/01/70 00:00      
         then, it is simple            01/01/70 00:00      
            in the .M51 file...            01/01/70 00:00      
            the "GRADUAL change"            01/01/70 00:00      
         Eighty-Fifty-One            01/01/70 00:00      
   This or that?            01/01/70 00:00      
      ORG is origin within segment            01/01/70 00:00      
         I've done...            01/01/70 00:00      
      in Keil            01/01/70 00:00      

Back to Subject List