No Magic here ...
Hi, Hervé
Here an example ( ASM source ... )
REDCYL ;SUB pour lire SEUIL et NCYL
movlw 1 ;Aller dans LTABLE chercher le SEUIL (negatif)
;de ligne rouge
bcf PCLATH,0 ;LTABLE est la page 2(en h200)
bsf PCLATH,1 ;donc PCLATH =2
call LTABLE
and somewhere further
LTABLE org h'200' ;Table des delais N =367 - 1500 t/mn(0° avant,soit T/4)
addwf PCL,f ;sauter au bon endroit h34=opcode pour RETLW
INCLUDE c:\aepl\Oltab.txt ;ici la LTABLE préalablement générée par le prog. gentab.bas
The goal is to retrieve a value in a Lookup table ...
BUT you NEED to know the page number ... where you want to jump to !!!
So, a solution is to place " manually" your called stubb to a known location ( not "squatted" ) by PbP ... :
ORG xxxx
CalledStubb
.....
.....
PbP example
'************************************************* ****************************
'Table des Valeurs d'avance en 200h - longueur Maxi 254 lignes !!!
'************************************************* ****************************
asm
bcf PCLATH,0
bsf PCLATH,1
call Table
Movwf _Avance
endasm
and further, at the very top high free program location.
asm
ORG 200h
Table
movfw _Index
addwf PCL,F
Include C:\Documents and Settings\Alain\Mes documents\Avance.txt
endasm
END
No secret there ...
Bonnes vacances ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks