Debug macro in assembler

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello folks,
Have you ever tried to debug assembler macro?
Something like
.MACRO ADDI16
subi @0,low(-@2)
sbci @1,high(-@2)
.ENDMACRO

and see what is going on in there?
Please tell me if this is possible
Thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you mean you want to see the code after macro expansion then start the code in the simulator and on the view menu select Disassembler and you should see something like:

15:         ADDI16 R24,R25, 1234
+00000002:   528E        SUBI      R24,0x2E       Subtract immediate
+00000003:   4F9B        SBCI      R25,0xFB       Subtract immediate with carry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ectually ,i want to debug step by step into the macro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,with the Disassembler it is possible to step in
Thank you clawson

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also

Quote:
LISTMAC - Turn macro expansion on
The LISTMAC directive tells the Assembler that when a macro is called, the expansion of the macro is to be shown on the listfile generated by the Assembler. The default is that only the macro-call with parameters is shown in the listfile.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly