Pearl Posted April 25, 2004 Report Share Posted April 25, 2004 Hi there ...I want to add some encoders to the lc-emulation but if I try to compile the new file I got the following message:Executing: "C:\Programme\MPLAB IDE\MCHIP_Tools\mpasmwin.exe" /q /p18F452 "main.asm" /l"main.lst" /e"main.err"Error[126]  D:\REMOTECONTROL\MIOS\2_XT2_MIDIBOX_LC_V1_4\LC_SFB.INC 238 : Argument out of range (1027 not between -1024 and 1023)Halting build on first failure as requested.BUILD FAILEDmy code in "enc.inc": USER_ENC_NotifyChange    ;; if encoder number within 0 and 7, send a V-pot event    movlw    0x07    IFLEQ    MIOS_PARAMETER1, ACCESS, rgoto LC_ENC_SendVPot    movf    MIOS_PARAMETER1, W    ;; if encoder number == 8, send jog-wheel event    xorlw    0x08    bz    LC_ENC_SendJogWheel       ;; if encoder number within 9 and 13, send NRPN-event    movf    MIOS_PARAMETER1, W    xorlw    0x09    bz LC_ENC_SendNRPN    movf    MIOS_PARAMETER1, W    xorlw    0x0A    bz LC_ENC_SendNRPN    movf    MIOS_PARAMETER1, W    xorlw    0x0B    bz LC_ENC_SendNRPN    movf    MIOS_PARAMETER1, W    xorlw    0x0C    bz LC_ENC_SendNRPN       ;; if encoder number > 13, send CC-event    movlw    0x0D    IFGEQ    MIOS_PARAMETER1, ACCESS, rgoto LC_ENC_SendCC    ;; else do nothing    return LC_ENC_SendNPRN and LC_SendCC are new subroutines to handle NRPN/CC - events.Any idea wath's wrong?thnx Pearl Quote Link to comment Share on other sites More sharing options...
TK. Posted April 26, 2004 Report Share Posted April 26, 2004 Hi, Error[126] D:\REMOTECONTROL\MIOS\2_XT2_MIDIBOX_LC_V1_4\LC_SFB.INC 238 : Argument out of range (1027 not between -1024 and 1023)whats the code at this line?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Pearl Posted April 27, 2004 Author Report Share Posted April 27, 2004 Hi TK ...Additional info :- LC_SFB.inc : I don't know exactly (got only the online-partition here) but it's standard code from lc emulation (ver. 4) - no changes- if I left out 4 lines everything is ok ... it seems that the pointer from the LC_SFB.inc is 1023 or less.- I can reproduce this with left out 3 lines --> makes error "Argument out of range(1024 .....)" and so on - the new subs LC_ENC_SendNPRN and LC_SendCC are empty at the moment ( only "return")p.s. If it is ok we can post in german till we found the solution. [it would be much easier to describe the problem ;-) ]Bye Pearl Quote Link to comment Share on other sites More sharing options...
TK. Posted April 28, 2004 Report Share Posted April 28, 2004 I didn't saw this imperfection since it's already fixed in my private version.Open lc_sfb.inc, go to line 238 and change "rcall" by "call"Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Pearl Posted April 28, 2004 Author Report Share Posted April 28, 2004 Hi TK ...I will try this today :DThanx and ByePearl Quote Link to comment Share on other sites More sharing options...
Pearl Posted April 29, 2004 Author Report Share Posted April 29, 2004 Hi ...It works :DCooooool ;DByePearl Quote Link to comment Share on other sites More sharing options...
Pearl Posted June 21, 2005 Author Report Share Posted June 21, 2005 Hi there ...Today I tried to update my LC - Application to Vers. 1.6 by copying all my personal modifications to the new source files, but after compiling, I got a similar error as in the past:"Error[126]Â Â E:\MIOS\SW\LC 1.6\LC_1_V1_6\MACROS.H 161 : Argument out of range (1044 not between -1024 and 1023)"What's the meaning of this error-message? And how can I solve this problem?I didn't changed anything in "Macros.h"! Thanx and byePearl Quote Link to comment Share on other sites More sharing options...
TK. Posted June 21, 2005 Report Share Posted June 21, 2005 Hi Pearl,another question: are you interested in beta-testing the C version - maybe it will be easier for you to add some modificationsBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Pearl Posted June 22, 2005 Author Report Share Posted June 22, 2005 Hi TK ...I didn't writing anything in C , but I got advanced skills VB/VB.Net .So I think, I want to try the beta and will learning by doing. ;-)Another question to my problem: Are memory limits or limits of "branch" and "jumping" in assembler the reason?My additional code is OK in "LC_1_5". I work with my LC one year.Thanx and byePearl Quote Link to comment Share on other sites More sharing options...
TK. Posted June 25, 2005 Report Share Posted June 25, 2005 Hi Pearl,Another question to my problem: Are memory limits or limits of "branch" and "jumping" in assembler the reason?Yes, there are limitations, which can easily be fixed.E.g., if the error happens on a "rgoto" or "bra", use "goto" insteadIf the error happens on a "rcall", use "call" insteadIf it happens on a "bz" or "bnz", use "skpnz/skpz" and "goto" or "rgoto" insteadJust take a look into the main.lst file and search for the error message, this should make clear where it exactly happensAlpha version (not complete!) of C based MIDIbox LC can now be downloaded from this location:http://www.ucapps.de/mios/midibox_lc_v2_0_alpha1.zipBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Pearl Posted June 27, 2005 Author Report Share Posted June 27, 2005 Hi,I found the wrong line in main.lst and replaced "rgoto" with "goto" and now everything works fine. Thanx for your hint ... :-) ;-)Bye Paerl Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.