home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-07-27 | 1.3 KB | 67 lines | [TEXT/KAHL] |
- //
- // dcmdGlue.c, source for the glue for writing 'dcmd' resources with THINK C
- //
- // Daniel Jibouleau, 25/7/94
- //
-
- #include "dcmd.h"
-
- /* CommandEntry is the name of the dcmd routine. It is called by main (entry point for the res.) */
- extern pascal void CommandEntry (dcmdBlock *pb);
-
- /* main is the entry point for the dcmd resource. It is the interface to the dcmd routine */
- pascal void main ()
- {
- asm {
- ori.b #0, d2
- jmp CommandEntry
- lea 0x2a(a5), a0
- extern dcmdDrawLine:
- bsr.s @1
- extern dcmdDrawString:
- @2 bsr.s @1
- extern dcmdDrawText:
- bsr.s @1
- extern dcmdScroll:
- bsr.s @1
- extern dcmdDrawPrompt:
- bsr.s @1
- extern dcmdGetPosition:
- bsr.s @1
- extern dcmdSetPosition:
- bsr.s @1
- extern dcmdGetNextChar:
- bsr.s @1
- extern dcmdPeekAtNextChar:
- bsr.s @1
- extern dcmdGetNextParameter:
- bsr.s @1
- extern dcmdGetNextExpression:
- bsr.s @1
- extern dcmdGetBreakMessage:
- bsr.s @1
- extern dcmdGetNameAndOffset:
- bsr.s @1
- extern dcmdGetTrapName:
- bsr.s @1
- extern dcmdGetMacroName:
- bsr.s @1
- extern dcmdSwapWorlds:
- bsr.s @1
- extern dcmdSwapScreens:
- bsr.s @1
- extern dcmdForAllHeapBlocks:
- bsr.s @1
- nop
- @1 move.l (a7)+, d0
- lea @2, a1
- sub.l a1, d0
- lsr.l #1, d0
- movea.l (a7)+, a0
- move.w d0, -(a7)
- move.l a0, -(a7)
- movea.l 4(a5), a0
- jmp (a0)
- }
- }
-