Hi need some ASM help
Ok i am just working on some code [and i realise the W and other registers have not been saved yet, do that later, perhaps after i get some breaky, anyhow.
Basically i send a command over RS232, wait for a reply, then send another byte, in this case a memory address which points to a location in the access bank. what i want to do is put the value of the data at the address stored in debug_data to W so it can be sent back to the PC.
Any ideas? I think there was something in elektor a few months ago, i will search my room for it now, but neone have any ideas?
Ok i am just working on some code [and i realise the W and other registers have not been saved yet, do that later, perhaps after i get some breaky, anyhow.
Code:
isr
; Handle Interupts
BTFSC PIR1, RCIF ; If RCIF Set GOTO Debug
GOTO Debug
GOTO Int_Exit
Debug
CALL Getc ; Get The Command
MOVWF debug_command
MOVLW 0x7A
CALL Putc ; Send We are here
if debug_command == 0x01 ; Its a debug command
CALL Getc ; Get The Data
MOVWF debug_data
***
CALL Putc
endif
GOTO Int_Exit
Int_Exit
RETFIE
Basically i send a command over RS232, wait for a reply, then send another byte, in this case a memory address which points to a location in the access bank. what i want to do is put the value of the data at the address stored in debug_data to W so it can be sent back to the PC.
Any ideas? I think there was something in elektor a few months ago, i will search my room for it now, but neone have any ideas?