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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/04/03 21:48
Read: times


 
#42911 - RE: Magic start address
Responding to: ???'s previous message
The test you assembled translates to ASCII bytes
such that:

'(c) Copyright, 1984' .... translates to binary codes as:
28H,63H,29H,20H,43H,6FH,70H,79H,72H,69H,
67H,68H,74H,2CH,20H,31H,39H,38H,34H

My assembler adds a zero at the end of a string
in a DB statement.

At reset the processor reads the binary bytes
thinking that they are code. Here is a disassembly
listing of the corresponding "code".
0x0000    28       ADD      A,R0
0x0001    632920   XRL      0x29,#0x20
0x0004    436F70   ORL      0x6F,#0x70
0x0007    7972     MOV      R1,#0x72
0x0009    69       XRL      A,R1
0x000A    67       XRL      A,@R1
0x000B    68       XRL      A,R0
0x000C    742C     MOV      A,#0x2C
0x000E    203139   JB       0x26.1,0x004A
0x0011    38       ADDC     A,R0
0x0012    3400     ADDC     A,#0x00

I notice in particular that if it should by chance be that internal RAM location location 0x26 bit 1 would happen to power up in the '1' set state then the JB instruction would vector this code snippett to code address 0x004A. This would make it skip whatever code you had placed after the string.

Michael Karas





List of 7 messages in thread
TopicAuthorDate
Magic start address            01/01/70 00:00      
   RE: Magic start address            01/01/70 00:00      
   RE: Magic start address            01/01/70 00:00      
   RE: Magic start address            01/01/70 00:00      
   just goes to show...            01/01/70 00:00      
      RE: just goes to show...            01/01/70 00:00      
      RE: just goes to show..., Andy            01/01/70 00:00      

Back to Subject List