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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/11/99 22:35
Read: times


 
#290 - RE: 8051 C compiler
I don't think so, but there is a definite need for one. The problem is in accessing the variables from inside the local function. It can be done, but it is inefficient. Something like:

; function entry
push Base
mov Base, SP

; access a variable BYTE
mov a, #<two's comp of local index>
add a, Base
mov R0, a
mov a, @R0 ; ACC has variable in it

; function exit
pop Base
ret

It would certainly be a nice option on an existing compiler.



List of 4 messages in thread
TopicAuthorDate
8051 C compiler            01/01/70 00:00      
RE: 8051 C compiler            01/01/70 00:00      
RE: 8051 C compiler            01/01/70 00:00      
RE: 8051 C compiler            01/01/70 00:00      

Back to Subject List