Subroutine placement - must they come first?


Results 1 to 7 of 7

Threaded View

  1. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Subroutine placement - must they come first?

    One good thing to remember about asm DATA, DA, DT...

    Recently I've messed a lot with the Nokia GLCD thing and while I added Strings, some could not be properly displayed, code went to lalaLand. The reason is like Bruce said... page boundary. In the end my macro just needed a simple modification... from something like
    Code:
    MyWhateverString Macro Str
               local STRStart, STREnd
               GOTO STREnd
    STRStart
               DT Str
    STREnd
               MOVE?CW STRStart, _WhateverAddrVar
               L?CALL _MainSub
               ENDM
    To
    Code:
    MyWhateverString Macro Str
               local STRStart, STREnd
               L?GOTO STREnd
    STRStart
               DT Str
    STREnd
               MOVE?CW STRStart, _WhateverAddrVar
               L?CALL _MainSub
          ENDM
    problem solved
    Last edited by mister_e; - 13th July 2011 at 18:11.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts