home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 3 / MA_Cover_3.iso / maksiu / tools / apcii.lha / ApcII_V1.0 / ApcII.S < prev    next >
Encoding:
Text File  |  1996-10-27  |  15.7 KB  |  797 lines

  1. **************************************************
  2. * Amos Professional Compiler Intuition Interface *
  3. **************************************************
  4.  
  5. * Version 1.01  27/10/1996  by Fabrizio Bazzo
  6. * via del Carso, 29    34170  Gorizia   ITALY
  7.  
  8. * If you want to modify the source and release an
  9. * enhanced version, please send me a copy!
  10.  
  11. sysbase =    4
  12.             ;Exec
  13. OpenLibrary =    -408
  14. CloseLibrary =    -414
  15. Wait =        -318
  16. GetMsg =    -372
  17. ReplyMsg =    -378
  18. Forbid =    -132
  19. FindTask =    -294
  20. WaitPort =    -384
  21.             ;Intuition
  22. OpenWindow =    -204
  23. CloseWindow =    -72
  24. WbenchToFront =    -342
  25. WbenchToBack =    -336
  26. DrawBorder =    -108
  27. AutoRequest =    -348
  28. PrintIText =    -216
  29.             ;Graphics
  30. Draw =        -246
  31. Move =        -240
  32. Text =        -60
  33. SetAPen =    -342
  34. RectFill =    -306
  35. OpenFont =    -72
  36. CloseFont =    -78
  37.             ;Dos
  38. Execute =    -222
  39. Open =        -30
  40. Close =        -36
  41.             ;ReqTools
  42. rtAllocRequest =    -30
  43. rtFreeRequest =        -36
  44. rtFileRequest =        -54
  45. rtEZrequest =        -66
  46. rtPaletteRequest =    -102
  47.  
  48. CallExec:    macro
  49.         move.l sysbase,a6
  50.         jsr \1(a6)
  51.         endm
  52. CallDos:    macro
  53.         move.l dosbase,a6
  54.         jsr \1(a6)
  55.         endm
  56. CallIntu:    macro
  57.         move.l intbase,a6
  58.         jsr \1(a6)
  59.         endm
  60. CallGfx:    macro
  61.         move.l gfxbase,a6
  62.         jsr \1(a6)
  63.         endm
  64. CallRT:        macro
  65.         move.l rtbase,a6
  66.         jsr \1(a6)
  67.         endm
  68. Glom:        macro
  69.         movem.l d0-d7/a0-a6,-(sp)
  70.         endm
  71. Splut:        macro
  72.         movem.l (sp)+,d0-d7/a0-a6
  73.         endm
  74.  
  75. ;    begin of startup  code
  76.  
  77.     clr.l    WBMsg        
  78.     sub.l    a1,a1        ;Own Task
  79.     CallExec FindTask    ;Where?
  80.     move.l    d0,a4
  81.     tst.l    $ac(a4)        ;fromWB?
  82.     beq.b    fromWB        ;da
  83. fromCLI:            ;no command line to deal with
  84.     bra.b    run        ;go!
  85. fromWB:    lea    $5c(a4),a0
  86.     CallExec WaitPort    ;Wait 4 Start msg
  87.     lea    $5c(a4),a0    
  88.     CallExec GetMsg        ;Got it
  89.     move.l    d0,WBMsg
  90. run:    bsr.b    OpenAll
  91.     move.l    d0,-(sp)    ;Get Return-Code
  92.     tst.l    WBMsg        ;from WB?
  93.     beq.b    exit        ;niet: CLI
  94.     CallExec Forbid
  95.     move.l    WBMsg(pc),a1    ;Reply it    
  96.     CallExec ReplyMsg        
  97. exit:    move.l    (sp)+,d0    ;Get Return-Code
  98.     rts            ;end of program
  99.     cnop 0,2
  100. WBMsg:    dc.l    0
  101.  
  102. ;    end of startup code
  103.  
  104. OpenAll:
  105. OpenRT:        lea rtname(pc),a1    ; Open reqtools
  106.         clr.l d0
  107.         CallExec OpenLibrary
  108.         tst.l d0
  109.         bne.b GotIt
  110.         lea intname(pc),a1
  111.         clr.l d0
  112.         CallExec OpenLibrary    ;open intuition
  113.         beq.w CloseAll
  114. SysRequest:    move.l d0,intbase
  115.         move.l #0,a0        ;autorequest window
  116.         lea body1(pc),a1
  117.         move.l    #0,a2
  118.         lea kotxt(pc),a3    ;reqtools not found!
  119.         clr.l    d0
  120.         move.l    #$440,d1    ;flags
  121.         move.l    #300,d2
  122.         move.l    #70,d3
  123.         CallIntu AutoRequest
  124.         bra.b    CloseAll    ;Cancel selected
  125.         
  126. GotIt:        move.l d0,rtbase
  127.         move.l d0,a0
  128.         move.l $2a(a0),intbase    ; borrow a few pointers
  129.         move.l $2e(a0),gfxbase
  130.         move.l $32(a0),dosbase
  131. OpenNW:        lea newwdw(pc),a0    ; open window
  132.         CallIntu OpenWindow
  133.         beq.b CloseAll
  134.         move.l d0,wdwp
  135.  
  136.         bsr.b main
  137.  
  138. CloseAll:                ; close what we have opened
  139. Xwdw:        cmp.l #0,wdwp
  140.         beq.b Xint
  141.         move.l wdwp,a0
  142.         CallIntu CloseWindow
  143. Xint:        cmp.l #0,intbase
  144.         beq.b X_RT
  145.         move.l intbase,a1
  146.         CallExec CloseLibrary
  147. X_RT:        cmp.l #0,rtbase
  148.         beq.b Xprg
  149.         move.l rtbase,a1
  150.         CallExec CloseLibrary
  151. Xprg:        rts    
  152.  
  153.         
  154. main:    CallIntu WBenchtofront
  155.  
  156.     move.l    #nil,d1        ;new stdin-out
  157.     move.l    #1005,d2
  158.     CallDos Open
  159.     tst.l    d0
  160.     beq.W    Xmain
  161.     move.l    d0,nhdl        ;NIL handle
  162.  
  163.     move.l    wdwp,a0        ;draw borders
  164.     move.l    $32(a0),rport    ;rport
  165.     moveq    #1,d5        ;counter 1..6
  166.     lea    strarr(pc),a2    ;default strings
  167. strbxs:    move.w    #102,d0        ;x
  168.     move.w    #14,d1
  169.     mulu    d5,d1        ;y
  170.     move.l    rport,a0    ;draw borders
  171.     lea    strbox(pc),a1    ;border
  172.     CallIntu DrawBorder
  173.     move.l    (a2)+,a0    ;next string
  174.     bsr.w    drwstr
  175.     addq    #1,d5
  176.     cmp.w    #5,d5
  177.     bne.b    strbxs
  178.     move.w    #-1,ctype    ;start with WBtype
  179.     bsr.w    typrot        ;draw current type 
  180.  
  181.     move.l    #0,d0        ;type=RT_FILEREQ
  182.     move.l    #0,a0        ;^tags
  183.     CallRT rtAllocRequest
  184.     move.l    d0,reqstr
  185.     beq.w    Xnil
  186.  
  187. sleep:    move.l wdwp,a0
  188.     move.l $56(a0),a0
  189.     move.l a0,a5        ;user port
  190.     move.b $0f(a0),d1    ;Sigbit
  191.     moveq #0,d0
  192.     bset d1,d0
  193.     CallExec Wait
  194.  
  195. awake:    move.l a5,a0
  196.     CallExec GetMsg
  197.     move.l d0,a1
  198.     move.l $14(a1),d4    ;im_class
  199.     move.l $1c(a1),a4    ;im_Iaddress
  200.     CallExec ReplyMsg
  201.     cmpi.l #$200,d4        ;closewindow?
  202.     beq.w    Xreq
  203.     cmpi.l #$40,d4        ;gadup
  204.     beq.b    dogad
  205.     cmpi.l    #$20,d4        ;gdwn
  206.     beq.b    newset
  207.     bra.b sleep
  208.  
  209. dogad:    move.w    $26(a4),d2    ;ID
  210.     move.w    d2,d5        ;for box selection
  211.     clr.l    d7        ;dir flag
  212.     cmp    #1,d2
  213.     beq.b    newfile        ;source
  214.     cmp    #2,d2        ;dest
  215.     beq.b    newfile
  216.     cmp    #3,d2        ;libs
  217.     beq.b    newpath
  218.     cmp    #4,d2        ;temp
  219.     beq.b    newpath
  220.     cmp    #5,d2        ;config
  221.     beq.b    newfile
  222.     cmp    #11,d2        ;cmp-type
  223.     beq.b    newtype
  224.     cmp    #12,d2        ;about
  225.     beq.b    who
  226.     cmp    #13,d2        ;quit
  227.     beq.b    qreq
  228.     cmp    #14,d2        ;compile
  229.     beq.w    comp
  230. *    else
  231.     bra.w    sleep
  232.  
  233. newset:    move.w    $26(a4),d2    ;ID
  234.     subq    #6,d2
  235.     bchg    d2,settings
  236.     bra.w    sleep
  237.  
  238. newpath:
  239.     move.l    #8,d7        ;dir flag
  240. newfile:
  241.     bsr.w    getfile
  242.     tst.l    d6        ;got file?
  243.     beq.w    sleep
  244.     bsr.w    update
  245.     bra.w    sleep
  246.     
  247. newtype:            ;cycle compiled type
  248.     bsr.w    typrot
  249.     bra.w    sleep    
  250.         
  251. qreq:    lea    yn(pc),a2    ;quit request
  252.     lea    qtxt(pc),a1
  253.     move.l    #0,a0        ;no tags
  254.     move.l    #0,a3        ;no reqinfo
  255.     move.l    #0,a4        ;no argarray
  256.     CallRT rtEZrequest
  257.     move.l    d0,ezresp
  258.     bne.b    Xreq        ;confirm quit
  259.     bra.w    sleep
  260.  
  261. who:    lea    seen(pc),a2    ;who wrote this #@ยง*?
  262.     lea    me(pc),a1
  263.     move.l    #0,a0        ;no tags
  264.     move.l    #0,a3        ;no reqinfo
  265.     move.l    #0,a4        ;no argarray
  266.     CallRT rtEZrequest
  267.     bra.w    sleep
  268.     
  269. comp:    bsr.w    build        ;build cmd string
  270.     move.l    #buffer,d1
  271.     move.l    nhdl,d2
  272.     move.l    nhdl,d3
  273.     CallDos Execute
  274.     lea    buffer(pc),a0
  275.     move.b    #0,(a0)        ;clear file buffer
  276.     bra.w    sleep
  277.  
  278. Xreq:    move.l    reqstr,a1    ;close/dealloc. and exit
  279.     CallRT rtFreeRequest
  280.     
  281. Xnil:    move.l    nhdl,d1
  282.     CallDos Close
  283.  
  284. Xmain:    rts
  285.  
  286. getfile:
  287.     move.l    reqstr,a0
  288.     adda.l    #8,a0
  289.     move.l    d7,(a0)        ;get dir if D7=8, else get file
  290. _file:    move.l    reqstr,a1    ;req struct
  291.     lea    buffer(pc),a2    ;buffer
  292.     lea    freqtit(pc),a3    ;^title    
  293.     move.l    #0,a0        ;^tags
  294.     CallRT rtFileRequest
  295.     move.l    d0,d6        ;filereq->dir    path
  296. Xgfile:    rts            ;buffer        filename
  297.  
  298.  
  299. update:    lea    strarr(pc),a1    ;settings buffer
  300.     move.l    d5,d4
  301.     sub.l    #1,d4
  302.     lsl.l    #2,d4
  303.     adda.l    d4,a1        ;get destination address
  304.     move.l    (a1),a1
  305.     move.l    a1,a2
  306.     move.l    reqstr,a0
  307.     move.l    $10(a0),a0
  308.     cmp    #3,d5        ;src or dst add quotes
  309.     bge.b    noqu
  310.     move.b    #'"',(a1)+
  311. noqu:    bsr.w    strcopy        ;copy path
  312.     cmp.b    #':',-2(a1)    ;check if root
  313.     beq.b    xnull
  314.     move.b    #'/',-1(a1)    ;slash over NULL
  315.     bra.b    upd1
  316. xnull:    adda    #-1,a1        ;next byte will overwrite NULL
  317.     upd1:    tst.l    d7        ;check path-only flag
  318.     beq.b    upd2
  319.     move.b    #0,(a1)        ;NULL after : or /
  320.     bra.b    quote        
  321. upd2:    lea    buffer(pc),a0    ;copy filename
  322.     bsr.w    strcopy
  323. quote:    cmp    #3,d5        ;src or dst add quotes
  324.     bge.b    inbox
  325.     move.b    #'"',-1(a1)    ;over NULL
  326.     move.b    #0,(a1)
  327. inbox:    move.l    a2,a0        ;display up to 34 bytes
  328.     bsr.w    strlen        ;d6=len
  329.     sub.l    #34,d6
  330.     bmi.b    lenok        ;<=34
  331.     adda.l    d6,a0
  332. lenok:    bsr.w    drwstr        ;d5 still holds ID
  333.     clr.l    d7        ;clear dir flag
  334.     rts
  335.  
  336. build:    lea    stubs(pc),a2    ;array of ^cmd bits
  337.     lea    buffer(pc),a1
  338.     move.l    (a2)+,a0
  339.     move.b    #'"',(a1)+    ;avoid 'RAM DISK:'-type space problems 
  340.     bsr.w    strcopy        ;system path
  341.     adda.l    #-1,a1
  342.     moveq    #4,d0
  343. cmp1:    move.l    (a2)+,a0    ;apcmp > <...,src,dst,to,typ
  344. noqu1:    bsr.b    strcopy
  345. noqu2:    move.b    #' ',-1(a1)    ;space over NULL
  346.     dbra    d0,cmp1
  347.     move.w    ctype,d0    ;0,1,2,3
  348.     add    #$30,d0        ;ascii
  349.     move.b    d0,-1(a1)    ;compiled type
  350.     move.b    #' ',(a1)+
  351.     move.l    (a2)+,a0    ;def,err,wb,long,inclib
  352.     moveq    #0,d0        ;test flags
  353. nxtopt:    btst    d0,settings    ;d1
  354.     bne.b    useit        ;use Do-it option
  355. *    else
  356.     cmp    #4,d0        ;special case INCLIB
  357.     bne.b    addno
  358.     adda.l    #3,a0        ;skip INC
  359. addno:    move.b    #'N',(a1)+
  360.     move.b    #'O',(a1)+
  361. useit:    bsr.b    strcopy        ;use new settings
  362.     move.b    #' ',-1(a1)
  363.     move.l    (a2)+,a0
  364.     addq    #1,d0
  365.     cmp    #5,d0
  366.     bne.b    nxtopt
  367.     bsr.b    strcopy        ;tmp=,Temp,libs=,system
  368.     adda.l    #-1,a1
  369.     move.l    (a2)+,a0
  370.     bsr.b    strcopy
  371.     move.b    #'"',-1(a1)
  372.     move.b    #' ',(a1)+
  373.     move.l    (a2)+,a0    ;libs=
  374.     bsr.b    strcopy
  375.     adda.l    #-1,a1
  376.     move.l    (a2)+,a0    ;libs
  377.     bsr.b    strcopy
  378.     move.b    #'"',-1(a1)
  379.     move.b    #0,(a1)        ;end with NULL
  380.     rts
  381.  
  382. strcopy:            ;A0:source,0 A1:dst
  383. sc1:    move.b    (a0)+,(a1)+
  384.     bne.b    sc1
  385.     rts
  386.  
  387. strlen:    move.l    a0,-(sp)
  388.     moveq.l    #0,d6        ;A0:string,0 D6:len
  389. sl1:    addq.l    #1,d6
  390.     cmp.b    #0,(a0)+
  391.     bne.b    sl1
  392.     move.l    (sp)+,a0    
  393.     rts
  394.     
  395. drwstr:                ;A0: string,0  d5: box 1..5
  396.     lea    jolly(pc),a1
  397.     bsr.b    strcopy
  398.     move.l    rport,a1    ;clear old strings
  399.     moveq    #0,d0
  400.     CallGfx SetAPen
  401.     move.l    rport,a1
  402.     move.w    #104,d0        ;x0
  403.     move.w    #14,d1
  404.     mulu    d5,d1
  405.     addq    #1,d1        ;y0
  406.     move.w    #376,d2        ;x1
  407.     move.w    d1,d3
  408.     addq    #8,d3        ;y1
  409.     CallGfx RectFill    
  410.     lea    itstr(pc),a1
  411.     move.l    rport,a0    ;draw new strings
  412.     move.w    #102,d0        ;x
  413.     move.w    #14,d1
  414.     mulu.w    d5,d1        ;y
  415.     addq    #2,d1
  416.     CallIntu PrintIText    
  417.     rts
  418.  
  419. typrot:    moveq    #0,d0        ;cycle compiled type
  420.     move.l    rport,a1
  421.     CallGfx SetAPen
  422.     move.l    rport,a1
  423.     move.w    #403,d0        ;x0
  424.     move.w    #74,d1
  425.     move.w    #464,d2        ;x1
  426.     move.w    #85,d3
  427.     CallGfx RectFill    
  428.     move.w    ctype,d4
  429.     addq    #1,d4
  430.     cmp    #4,d4
  431.     bne.b    oktype
  432.     moveq    #0,d4
  433. oktype:    move.w    d4,ctype
  434.     lsl.l    #2,d4    
  435.     lea    types,a1
  436.     move.l    0(a1,d4.l),a0    ;source
  437.     lea    typdef(pc),a1
  438.     bsr.w    strcopy
  439.     lea    typ0(pc),a1
  440.     move.l    rport,a0    ;draw new strings
  441.     move.w    #403,d0        ;x
  442.     move.w    #74,d1
  443.     CallIntu PrintIText
  444.     rts
  445.  
  446. ;patchItxt:
  447. ;    moveq    #27,d0
  448. ;    lea    itfptr,a0
  449. ;pit0:    move.l    (a0)+,a1
  450. ;    move.l    topaz80,(a1)
  451. ;    dbra    d0,pit0
  452. ;    rts
  453.     cnop 0,2
  454. intbase:    dc.l 0
  455. gfxbase:    dc.l 0
  456. dosbase:    dc.l 0
  457. rtbase:        dc.l 0
  458. wdwp:        dc.l 0
  459. rport:        dc.l 0
  460. topaz80:    dc.l 0
  461. reqstr:        dc.l 0
  462. ezresp:        dc.l 0
  463. nhdl:        dc.l 0
  464. ctype:        dc.w 0
  465. settings:    dc.b %1,0    ;bit0=DEF bit4=INCLIB
  466.  
  467. rtname:        dc.b 'reqtools.library',0
  468.     cnop 0,2    
  469. intname:    dc.b 'intuition.library',0
  470.     cnop 0,2
  471. freqtit:    dc.b 'What? Where?',0
  472.     cnop 0,2
  473. fontname:    dc.b 'topaz.font',0
  474.     cnop 0,2
  475. nil:        dc.b 'Nil:',0
  476.     cnop 0,2    
  477. buffer:        blk.b 256,0
  478.     cnop 0,2
  479.     
  480.     
  481. newwdw:    dc.w 64        ;left offset
  482.     dc.w 50        ;top offset 90
  483.     dc.w 500    ;width
  484.     dc.w 89        ;height 140
  485.     dc.b 0        ;detailPen
  486.     dc.b 1        ;blockPen
  487.     dc.l $260    ;IDCMP Gup $40 Gdown $20 close $200
  488.     dc.l $100e    ;flags $1000 active
  489.     dc.l gadg1    ;firstGadget
  490.     dc.l 0        ;checkMark
  491.     dc.l title    ;title
  492. scrpw:    dc.l 0,0    ;screen (WB 0),superbm
  493.     dc.w 0,0,0,0    ;maxw
  494.     dc.w $1        ;type (WB 1)
  495.     cnop 0,2    
  496.         
  497. ******* TextAttr ******
  498. font:    dc.l fontname
  499.     dc.w 8        ; topaz_heighty or nothing
  500.     dc.b 0
  501.     dc.b 0
  502.     cnop 0,2
  503.     
  504. ******* Gadgets ***
  505. gadg1:    dc.l gadg2            ;next
  506.     dc.w 10,13,82,12,$0,$1,1    ;left,top,w,h,flags,act,type 
  507.     dc.l bord1,0,gtxt1,0,0        ;grend,selrend,txt,mut,info
  508.     dc.w 1                ;ID
  509.     dc.l 0                ;usr
  510. gadg2:    dc.l gadg3
  511.     dc.w 10,27,82,12,$0,$1,1
  512.     dc.l bord1,0,g2txt1,0,0
  513.     dc.w 2
  514.     dc.l 0
  515. gadg3:    dc.l gadg4
  516.     dc.w 10,41,82,12,$0,$1,1
  517.     dc.l bord1,0,g3txt1,0,0
  518.     dc.w 3
  519.     dc.l 0
  520. gadg4:    dc.l gadg6
  521.     dc.w 10,55,82,12,$0,$1,1
  522.     dc.l bord1,0,g4txt1,0,0
  523.     dc.w 4
  524.     dc.l 0
  525. gadg6:    dc.l gadg7            ;compilation flags
  526.     dc.w 470,13,16,10,$86,$102,1
  527.     dc.l img1,img2,g6txt1,0,0
  528.     dc.w 6
  529.     dc.l 0
  530. gadg7:    dc.l gadg8
  531.     dc.w 470,25,16,10,$6,$102,1
  532.     dc.l img1,img2,g7txt1,0,0
  533.     dc.w 7
  534.     dc.l 0
  535. gadg8:    dc.l gadg9
  536.     dc.w 470,37,16,10,$86,$102,1
  537.     dc.l img1,img2,g8txt1,0,0
  538.     dc.w 8
  539.     dc.l 0
  540. gadg9:    dc.l gadg10
  541.     dc.w 470,49,16,10,$6,$102,1
  542.     dc.l img1,img2,g9txt1,0,0
  543.     dc.w 9
  544.     dc.l 0
  545. gadg10:    dc.l gadg11
  546.     dc.w 470,61,16,10,$6,$102,1
  547.     dc.l img1,img2,g10txt1,0,0
  548.     dc.w 10
  549.     dc.l 0
  550. gadg11:    dc.l gadg12            ;compiled type
  551.     dc.w 470,74,16,10,$4,$1,1
  552.     dc.l img3,0,0,0,0
  553.     dc.w 11
  554.     dc.l 0
  555. gadg12:    dc.l gadg13            ;about
  556.     dc.w 10,73,82,12,$0,$1,1
  557.     dc.l bord1,0,g12txt1,0,0
  558.     dc.w 12
  559.     dc.l 0
  560. gadg13:    dc.l gadg14            ;quit
  561.     dc.w 156,73,82,12,$0,$1,1
  562.     dc.l bord1,0,g13txt1,0,0
  563.     dc.w 13
  564.     dc.l 0
  565. gadg14:    dc.l 0                ;compile
  566.     dc.w 302,73,82,12,$0,$1,1
  567.     dc.l bord1,0,g14txt1,0,0
  568.     dc.w 14
  569.     dc.l 0
  570.  
  571. ******* Border ***
  572. bord1:    dc.w 0,11        ;left,top
  573.     dc.b 1,0,0,5        ;col,bak,mode,pairs
  574.     dc.l coor1,bord2
  575. coor1:    dc.w 1,0,81,0,81,-11,80,-10,80,0 
  576. bord2:    dc.w 81,0
  577.     dc.b 2,0,0,5
  578.     dc.l coor2,0
  579. coor2:    dc.w -1,0,-81,0,-81,11,-80,10,-80,0 
  580.  
  581. strbox:    dc.w 280,0
  582.     dc.b 1,0,0,5
  583.     dc.l coor3,sbox2
  584. coor3:    dc.w -1,0,-280,0,-280,10,-279,9,-279,0
  585. sbox2:    dc.w 1,10
  586.     dc.b 2,0,0,5
  587.     dc.l coor4,0
  588. coor4:    dc.w 0,0,279,0,279,-10,278,-9,278,0
  589.  
  590. ******* Image *******
  591. img1:    dc.w 0,1,16,10,2    ;left,top,w,h,dep
  592.     dc.l OfBmap
  593.     dc.b %11,%0        ;pick,on/off
  594.     dc.l 0            ;next
  595. img2:    dc.w 0,1,16,10,2
  596.     dc.l OnBmap
  597.     dc.b %11,%0
  598.     dc.l 0
  599. img3:    dc.w 0,0,16,10,2
  600.     dc.l CyBmap
  601.     dc.b %11,%0
  602.     dc.l 0
  603.     
  604. ******* IntuiText ***
  605. gtxt1:    dc.b 1,0,0,0
  606.     dc.w 8,3        ;left,top
  607. itf1:    dc.l font,gdef,gtxt2
  608. gtxt2:    dc.b 2,0,0,0
  609.     dc.w 6,2
  610. itf2:    dc.l font,gdef,0
  611. gdef:    dc.b 'Source :',0
  612.     cnop 0,2
  613. g2txt1:    dc.b 1,0,0,0
  614.     dc.w 8,3        ;left,top
  615. itf3:    dc.l font,g2def,g2txt2
  616. g2txt2:    dc.b 2,0,0,0
  617.     dc.w 6,2
  618. itf4:    dc.l font,g2def,0
  619. g2def:    dc.b 'Dest   :',0
  620.     cnop 0,2
  621. g3txt1:    dc.b 1,0,0,0
  622.     dc.w 8,3        ;left,top
  623. itf5:    dc.l font,g3def,g3txt2
  624. g3txt2:    dc.b 2,0,0,0
  625.     dc.w 6,2
  626. itf6:    dc.l font,g3def,0
  627. g3def:    dc.b 'Libs   :',0
  628.     cnop 0,2
  629. g4txt1:    dc.b 1,0,0,0
  630.     dc.w 8,3        ;left,top
  631. itf7:    dc.l font,g4def,g4txt2
  632. g4txt2:    dc.b 2,0,0,0
  633.     dc.w 6,2
  634. itf8:    dc.l font,g4def,0
  635. g4def:    dc.b 'Temp   :',0
  636.     cnop 0,2
  637. g5txt1:    dc.b 1,0,0,0
  638.     dc.w 8,3        ;left,top
  639. itf9:    dc.l font,g5def,g5txt2
  640. g5txt2:    dc.b 2,0,0,0
  641.     dc.w 6,2
  642. itf10:    dc.l font,g5def,0
  643. g5def:    dc.b 'Config :',0
  644.     cnop 0,2
  645. g6txt1:    dc.b 1,0,0,0
  646.     dc.w -64,3        ;left,top
  647. itf11:    dc.l font,g6def,g6txt2
  648. g6txt2:    dc.b 2,0,0,0
  649.     dc.w -66,2
  650. itf12:    dc.l font,g6def,0
  651. g6def:    dc.b 'DEFAULT',0
  652.     cnop 0,2
  653. g7txt1:    dc.b 1,0,0,0
  654.     dc.w -64,3        ;left,top
  655. itf13:    dc.l font,g7def,g7txt2
  656. g7txt2:    dc.b 2,0,0,0
  657.     dc.w -66,2
  658. itf14:    dc.l font,g7def,0
  659. g7def:    dc.b 'ERRORS',0
  660.     cnop 0,2
  661. g8txt1:    dc.b 1,0,0,0
  662.     dc.w -64,3        ;left,top
  663. itf15:    dc.l font,g8def,g8txt2
  664. g8txt2:    dc.b 2,0,0,0
  665.     dc.w -66,2
  666. itf16:    dc.l font,g8def,0
  667. g8def:    dc.b 'WB2BACK',0
  668.     cnop 0,2
  669. g9txt1:    dc.b 1,0,0,0
  670.     dc.w -64,3        ;left,top
  671. itf17:    dc.l font,g9def,g9txt2
  672. g9txt2:    dc.b 2,0,0,0
  673.     dc.w -66,2
  674. itf18:    dc.l font,g9def,0
  675. g9def:    dc.b 'LONGJMP',0
  676.     cnop 0,2
  677. g10txt1:    dc.b 1,0,0,0
  678.         dc.w -64,3        ;left,top
  679. itf19:        dc.l font,g10def,g10txt2
  680. g10txt2:    dc.b 2,0,0,0
  681.         dc.w -66,2
  682. itf20:        dc.l font,g10def,0
  683. g10def:        dc.b 'INCLIB',0
  684.     cnop 0,2
  685. g12txt1:    dc.b 1,0,0,0
  686.         dc.w 20,3        ;left,top
  687. itf21:        dc.l font,g12def,g12txt2
  688. g12txt2:    dc.b 2,0,0,0
  689.         dc.w 18,2
  690. itf22:        dc.l font,g12def,0
  691. g12def:        dc.b 'ABOUT',0
  692.     cnop 0,2
  693. g13txt1:    dc.b 1,0,0,0
  694.         dc.w 28,3        ;left,top
  695. itf23:        dc.l font,g13def,g13txt2
  696. g13txt2:    dc.b 2,0,0,0
  697.         dc.w 26,2
  698. itf24:        dc.l font,g13def,0
  699. g13def:        dc.b 'QUIT',0
  700.     cnop 0,2
  701. g14txt1:    dc.b 1,0,0,0
  702.         dc.w 8,3        ;left,top
  703. itf25:        dc.l font,g14def,g14txt2
  704. g14txt2:    dc.b 2,0,0,0
  705.         dc.w 6,2
  706. itf26:        dc.l font,g14def,0
  707. g14def:        dc.b 'COMPILE!',0
  708.     cnop 0,2
  709. typ0:    dc.b 1,0,0,0    ;type
  710.     dc.w 6,3
  711. itf27:    dc.l font,typdef,typ1
  712. typ1:    dc.b 2,0,0,0
  713.     dc.w 4,2
  714. itf28:    dc.l font,typdef,0
  715. typdef:    blk.b 8,0    
  716. t0def:    dc.b 'WBENCH',0
  717. t1def:    dc.b 'CLI',0
  718. t2def:    dc.b 'CLI_DET',0
  719. t3def:    dc.b '.AMOS',0
  720.     cnop 0,2
  721. body1:    dc.b 0,1,1,0    ;auto front-back-mode,pad
  722.     dc.w 18,15    ;aut left-top
  723.     dc.l 0,_des,0
  724. kotxt:    dc.b 0,1,1,0
  725.     dc.w 6,3
  726.     dc.l 0,kot,0
  727. itstr:    dc.b 1,0,0,0
  728.     dc.w 4,0
  729.     dc.l font,jolly,0
  730.     cnop 0,2
  731. title:    dc.b 'ApcII V1.01',0
  732.     cnop 0,2
  733. _des:    dc.b 'I need reqtools.library V37+',0
  734.     cnop 0,2
  735. kot:    dc.b 'Oops!',0
  736.     cnop 0,2
  737. yn:    dc.b 'Da|Niet',0
  738.     cnop 0,2
  739. qtxt:    dc.b 'Quit APCII? Sure?  :^{',0
  740.     cnop 0,2
  741. seen:    dc.b 'So what?',0
  742.     cnop 0,2
  743. me:    dc.b ' AMOS Pro Compiler',$a,'Intuition Interface',$a
  744.     dc.b ' by Fabrizio Bazzo',0    
  745. jolly:    dc.b 'I am a very long dummy text',0
  746.     blk.b 12,0
  747.     cnop 0,2
  748. source:    dc.b '"ProgramToCompile.AMOS"',0
  749.     blk.b    78,0
  750.     cnop 0,2
  751. destin:    dc.b '"ProgramCompiled"',0
  752.     blk.b 84,0
  753.     cnop 0,2
  754. system:    dc.b 'Work:Amos_Pro/APSystem/',0
  755.     blk.b 77,0
  756.     cnop 0,2
  757. temp:    dc.b 'RAM DISK:'
  758.     blk.b 96,0
  759.     cnop 0,2
  760. cmd0:    dc.b 'APCMP" <NIL: >CON:68/61/492/75/Compiling...',0
  761.     cnop 0,2
  762. to:    dc.b 'TO',0
  763.     cnop 0,2
  764. type:    dc.b 'TYPE=',0
  765.     cnop 0,2
  766. nodef:    dc.b 'DEF',0
  767.     cnop 0,2
  768. err:    dc.b 'ERR',0
  769.     cnop 0,2
  770. wb:    dc.b 'WB',0
  771.     cnop 0,2
  772. long:    dc.b 'LONG',0
  773.     cnop 0,2
  774. inclib:    dc.b 'INCLIB',0    
  775.     cnop 0,2
  776. tmp:    dc.b 'TEMP="',0
  777.     cnop 0,2
  778. libs:    dc.b 'LIBS="'
  779.     cnop 0,2    
  780. strarr:    dc.l source,destin,system,temp
  781. types:    dc.l t0def,t1def,t2def,t3def
  782. stubs:    dc.l system,cmd0,source,to,destin,type,nodef,err,wb,long,inclib,tmp
  783.     dc.l temp,libs,system
  784. ;itfptr:dc.l itf1,itf2,itf3,itf4,itf5,itf6,itf7,itf8,itf9,itf10,itf11,itf12
  785. ;    dc.l itf13,itf14,itf15,itf16,itf17,itf18,itf19,itf20,itf21,itf22
  786. ;    dc.l itf23,itf24,itf25,itf26,itf27,itf28
  787.     cnop 0,2
  788.  
  789.     Section GadsData,DATA_C
  790.  
  791. OnBmap:    dc.w    $0000,$0001,$001b,$0033,$0663,$0bc3,$0183,$0003,$3fff,$0000
  792.     dc.w    $0000,$7ffe,$6000,$6000,$6000,$6000,$6000,$6000,$4000,$0000
  793. OfBmap:    dc.w    $0000,$0001,$0003,$0003,$0003,$0003,$0003,$0003,$3fff,$0000
  794.     dc.w    $0000,$7ffe,$6000,$6000,$6000,$6000,$6000,$6000,$4000,$0000
  795. CyBmap: dc.w    $0001,$0003,$07c3,$0c63,$0cf3,$0c63,$0c03,$07c3,$0003,$7fff
  796.     dc.w    $fffe,$c000,$c000,$c000,$c000,$c000,$c000,$c000,$c000,$8000
  797.