Hi, I'm a newbie. I've got some legacy code where I need to add some features. From the ISR routines I need to call some C functions. ISR is made up with assembly macros, the caller routine that uses the macro uses register bank 3. My functions takes 1 argument and doesn't return anything. I found from manual that I need to pass argument to R7. So I have this in the ISR macro
mov r7, port lcall _HandleRxUartInt
RSEG ?PR?_HandleRxUartInt?TIMER USING 0 _HandleRxUartInt: ;---- Variable 'port?244' assigned to Register 'R5' ---- MOV R5,AR7
caller and calee need the same 'using' you NEED to read "the bible" Erik here are the links to "the bible" Chapter 1 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf chapter 2 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf chapter 3 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf