just a shot in the dark here, but do you have the following line somewhere in your code?
HIGHINT:
If so, is it inside the ASM/ENDASM block?
Mike -
just a shot in the dark here, but do you have the following line somewhere in your code?
HIGHINT:
If so, is it inside the ASM/ENDASM block?
Mike -
Sorry - I did leave out some code.
To simplify things I tried -
DEFINE OSC 20
Goto Start
DEFINE INTHAND HIGHINT
Start:
PAUSEUS 10
Goto Start
HIGHINT: PAUSEUS 10
RESUME
I still get - 'Error[113] c:\Progra~1\picbas~1\incfil~1\pbppi18l.lib : Symbol not previously defined (HIGHINT)'.
PicBasic Pro labels will need an underscore in front of them.
Labels in assembly language do not.
But remember, you are creating an Assembly Language interrupt handler.Code:DEFINE INTHAND _HIGHINT
You cannot use PAUSEUS, PAUSE, SERIN or any of the other PBP commands.
And resume only works with ON INTERRUPT.
DT
Thanks! _HIGHINT works. That's not in the book! Can PBP subroutines be called from an assembly language interrupt? I can try it but if you already know the answer it'll save time.
It's not in the book, because you are not supposed to use PBP subroutines for Assembly Language Interrupts.
You should not call any PBP subroutines from ASM interrupts either.
Any PBP commands that use system variables will corrupt the program flow and it will have unexpected results.
If you need to run PicBasic language interrupts, you should use either ON INTERRUPT or DT_INTS
DT
I really like the look of DT_INTS-18.bas but there are a few syntaxes I didn't understand.
In the 'Elapsed_INT-18.bas' program you use 'MOVE?CT 0, T1CON,TMR1ON'
and in 'DT_INTS-18.bas' you use 'L?GOTO _RestorePBP_H'.
I've been looking for the '?' syntax. Where can I find it? It wasn't in the MPASM User Guide (at least not mine) or the PBP Compiler book.
I'll probably make a lot of people feel smart by asking this but I like to understand what I'm using.
Those are macros from the PBP library. You won't find them in any manuals.
You don't really need to understand the inner workings of DT_INTS to use them.
Which is kindof the purpose, allowing people to use Interrupts without knowing all the details of using interrupts.
After you have used them for a while, digging into the ASM code will make more sense.
DT
Bookmarks