New Micros, Inc  

Go Back   New Micros, Inc > Software Technical Support > FORTH ONLY
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 12-22-03, 08:36 PM
clirakis clirakis is offline
Registered User
 
Location: Rhode Island
Posts: 3
Send a message via AIM to clirakis
Forth IRQ High Level Handler

Hi all,
I have an older HC11 engine running Version 3.5E. I'm writing a new application that will require interrupt driving. So of course I am starting with the example application.

I have attached it below. What I find when I am downloading it to the HC11 is that when I come to the vector table where LO-LEVEL-IRQRTN is inserted, the CPU reboots.

Any ideas?
Attached Files
File Type: 4th irq_enable.4th (0 Bytes, 451 views)
__________________
Chris Lirakis
Reply With Quote
  #2  
Old 12-22-03, 10:41 PM
nmitech nmitech is offline
Moderator
 
Location: Big D, Texas
Posts: 1,285
The forum does not take any attachment file. If your file is small, you can copy and paste it here. If it's a large file, email me at nmitech@newmicros.com, i will find a place to put it for download if necessary.
Reply With Quote
  #3  
Old 12-23-03, 09:48 AM
clirakis clirakis is offline
Registered User
 
Location: Rhode Island
Posts: 3
Send a message via AIM to clirakis
code snippet

Hi, Thanks for the advice. I'll cut and paste and see how it goes.
( irq_enable )
( This series of words/proceedures was stolen from the manual )
( for the UM-MAX Max-FORTH Users Manual, page 84 )
( )
( Modified By Reason )
( -------- -- ------ )
( 04-Jan-02 CBL Original )
( -------------------------------------------------------------- )
HEX
: HI-LEVEL-IRQRTN ( HANDLE EXT PIN IRQ'S )
( Put our code here )
;
( ----------------------------- )
CODE LO-LEVEL-IRQRTN
( CC C, ' HI-LEVEL-IRQRTN CFA , ( LDD # CFA-OF-HI-LEVEL-IRQRTN )
( BD C, ATO4 , ( JSR ATO4 )
3B C, ( RTI )
END-CODE
( ----------------------------------- )
CODE-SUB CLI
0E C, ( CLI )
39 C, ( RTS )
END-CODE
( --------------------------------------- )
CODE-SUB SEI
0F C, ( SEI )
39 C, ( RTS )
END-CODE
( --------------------------------------- )
VARIABLE VEC-TABLE -2 ALLOT
7E C, FFFE @ , ( B7BF SCI SER SYS )
7E C, FFFE @ , ( B7C2 SPI SER )
7E C, FFFE @ , ( B7C5 PLS ACC OVFL )
7E C, LO-LEVEL-IRQRTN @ , ( B7C8 PLS ACC EDGE )
7E C, FFFE @ , ( B7CB TMR OVERFLOW )
7E C, FFFE @ , ( B7CE TMR OUT CMP 5 )
7E C, FFFE @ , ( B7D1 TMR OUT CMP 4 )
7E C, FFFE @ , ( B7D4 TMR OUT CMP 3 )
7E C, FFFE @ , ( B7D7 TMR OUT CMP 2 )
7E C, FFFE @ , ( B7DA TMR OUT CMP 1 )
7E C, FFFE @ , ( B7DD TMR IN CAP 3 )
7E C, FFFE @ , ( B7E0 TMR IN CAP 2 )
7E C, FFFE @ , ( B7E3 TMR IN CAP 1 )
7E C, FFFE @ , ( B7E6 REAL TIME )
7E C, FFFE @ , ( B7E9 IRQ )
7E C, FFFE @ , ( B7EC XIRQ )
7E C, FFFE @ , ( B7EF SWI )
7E C, FFFE @ , ( B7F2 OP-CODE TRAP )
7E C, FFFE @ , ( B7F5 COP FAILURE )
7E C, FFFE @ , ( B7F8 CLK MON )
HERE CONSTANT VEC-TABLE-END
( -------------------------------------------------- )
: VEC-INIT
( CHECK AND MOVE VECTORS IF NECESSARY )
VEC-TABLE-END VEC-TABLE - 0 ( RANGE )
DO
B7BF I + C@ VEC-TABLE I + C@ = NOT
IF VEC-TABLE I + C@ B7BF I + ." ." EEC! THEN
LOOP
;
( ------------------------------------------------- )
: ENABLE-IRQ'S
VEC-INIT
CLI
;
__________________
Chris Lirakis
Reply With Quote
  #4  
Old 12-23-03, 10:20 AM
nmitech nmitech is offline
Moderator
 
Location: Big D, Texas
Posts: 1,285
Add a TICK (') in front of the interrupt WORD, ' LO-LEVEL-IRQRTN in the vector table.

( --------------------------------------- )
VARIABLE VEC-TABLE -2 ALLOT
7E C, FFFE @ , ( B7BF SCI SER SYS )
7E C, FFFE @ , ( B7C2 SPI SER )
7E C, FFFE @ , ( B7C5 PLS ACC OVFL )
7E C, ' LO-LEVEL-IRQRTN @ , ( B7C8 PLS ACC EDGE )
7E C, FFFE @ , ( B7CB TMR OVERFLOW )
......
......
Reply With Quote
  #5  
Old 12-23-03, 12:29 PM
clirakis clirakis is offline
Registered User
 
Location: Rhode Island
Posts: 3
Send a message via AIM to clirakis
Thanks!..

Thank you for your help.
__________________
Chris Lirakis
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is On
Forum Jump



All times are GMT -5. The time now is 04:45 PM.


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.