Calling Macro After Cross Page Boundry


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Calling Macro After Cross Page Boundry

    You may be right longpole. But this is what it's pointing to at this time.
    Sometimes i guess we wish for more problems so we have more information to troubleshoot.

    Well DT_interrupts handles page crossing. I'm pretty sure. So I don't think this is good enough proof of being not the problem.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Calling Macro After Cross Page Boundry

    Have you tried putting your vars all in bank 0 ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Calling Macro After Cross Page Boundry

    O.K. I'll try that tomorrow. (I don't have chip with me now)
    thanks,
    Mike

  4. #4
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Calling Macro After Cross Page Boundry

    Archangel,
    No luck there. I just got a blank screen. I put all all my vars in Bank 0 like following example:
    posX var byte BANK0 SYSTEM

    I can get it to work if i manually do everything. But the macro would sure be nice.
    Mike -

  5. #5
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Calling Macro After Cross Page Boundry

    Got it working.
    Changed code in Macro. Removed the local label called OverVar. Not sure why it was there anyway. Also took the gosub LcdGotoXY out of for/next loop since it only needed to be executed once.
    Also put in provision in case the variable number = 0.

    here's updated macro:
    Code:
    'PrintVar Macro
    'Example: @ PrintVar x,y, _variableName
    '
    asm
    PrintVar macro x, y, variable
        MOVE?CB  x, _posX
        MOVE?CB  y, _posY
        MOVE?WW  variable, _varData
        L?CALL   _VariableOut
        endm
    endasm
    VariableOut:
        zeroFlag = 0
        gosub LcdGotoXY
        
        'cycle through all possible digts of word sized number
        for n = 4 to 0 step -1        		
            lcdData = (varData dig n) + 48
            if lcdData = 48 AND zeroFlag = 0 then SkipNum
            zeroFlag = 1
            gosub LcdSendChar
            posX = posX + 6
    SkipNum:
    		'if varData = 0 then print "0"
    		if n = 0 AND zeroFlag = 0 then	
            	gosub LcdSendChar
            endif
        next
    	return

Members who have read this thread : 0

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

Posting Permissions

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