home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / editor / tvx_edit.arc / ATARI.INF next >
Text File  |  1986-03-17  |  8KB  |  251 lines

  1. #------------------------- ATARI SPECIAL FILES -------------------------
  2.     This file contains some extra files needed to compile and use
  3. TVX on the Atari 520st.  These files are included in this one file.
  4. You will have to split it apart yourself.  The files assume you have
  5. the developers kit, and include:
  6.  
  7.     HIRES.S - the assembly source of the 25/50 line screen interface
  8.         RES25PRG.S - assembly source of PROGRAM to change to 25 lines
  9.     RES50PRG.S - assembly source of PROGRAM to change to 50 lines
  10.         { Just assemble and link/relmod these, no libraries needed }
  11.         These are needed because TVX allows you to switch to a 50
  12.         line display ('(' command), but doesn't force it back to
  13.         25 when it exits (maybe you want to stay in 50!).  Having
  14.         the programs allows you to switch back to 25 outside of
  15.         TVX.
  16.     STDIOTVX.H - fixed up version of stdio.h to avoid portab.h problems.
  17.     CTVX.BAT - Batch file to compile all modules of TVX. Assumes
  18.         the compiler is in A:, TVX source in B:, and the
  19.         batch file run from B: (e.g. {B}a:batch ctvx).
  20.         (If you build VIX or EMAX, you only need to recompile
  21.          the TVX_EDIT and TVX_LEX modules, after changing the ifdefs)
  22.         Be patient, it takes over an hour to compile on floppies.
  23.     LINKTVX.BAT - file to link tvx.  Assumes .o's on B:, run from a:.
  24.  
  25. #-------------------- cut here, save as HIRES.S -------------------------
  26. *  Make hi rez screen bios handle 25 lines of 8x16 characters
  27. *
  28.         .text
  29.         .globl _rez25
  30. LINEA_I        equ    $A000 
  31. GET_REZ        equ    4        ; extended bios resolution inquiry
  32. _rez25: 
  33.     link    R14,#-4            ; set up
  34.     move.w    #GET_REZ,-(sp)        ; get screen resolution
  35.     trap    #14 
  36.     addq.w    #2,sp
  37.     cmp.w    #2,d0            ; only execute if already in hi rez
  38.     bne    ex25f 
  39.     dc.w    LINEA_I            ; get the important pointers 
  40.     move.l    08(a1),a1        ; a1 -> 8x16 font header 
  41.     move.l    72(a1),-$0A(a0)        ; v_off_ad <- 8x16 offset table ad
  42.     move.l    76(a1),-$16(a0)        ; v_fnt_ad <- 8x16 font data addr 
  43.     move.w    #0016,-$2E(a0)        ; v_cel_ht <- 16  8x16 cell heigh
  44.     move.w    #0024,-$2A(a0)        ; v_cel_my <- 24  maximum cell "Y" 
  45.     move.w    #1280,-$28(a0)        ; v_cel_wr <- 1280  vertical byte offset
  46.     move    #1,R0            ; true return
  47.     bra    ex25
  48. ex25f:
  49.     move    #0,R0            ; false return
  50. ex25:    unlk    R14            ; prepare for return
  51.     rts
  52. *
  53. *  Make hi rez screen bios handle 50 lines of 8x8 characters
  54. *
  55.         .globl _rez50
  56. _rez50: 
  57.     link    R14,#-4            ; set up
  58.     move.w    #GET_REZ,-(sp)        ; get screen resolution
  59.     trap    #14 
  60.     addq.w    #2,sp
  61.     cmp.w    #2,d0            ; only execute if already in hi rez
  62.     bne    ex50f 
  63.     dc.w    LINEA_I            ; get the important pointers 
  64.     move.l    04(a1),a1        ; a1 -> 8x8 font header 
  65.     move.l    72(a1),-$0A(a0)        ; v_off_ad <- 8x8 offset table ad
  66.     move.l    76(a1),-$16(a0)        ; v_fnt_ad <- 8x8 font data addr 
  67.     move.w    #008,-$2E(a0)        ; v_cel_ht <- 8  8x8 cell heigh
  68.     move.w    #0049,-$2A(a0)        ; v_cel_my <- 49  maximum cell "Y" 
  69.     move.w    #640,-$28(a0)        ; v_cel_wr <- 640  vertical byte offset
  70.     move    #1,R0            ; true return
  71.     bra    ex50
  72. ex50f:
  73.     move    #0,R0            ; false return
  74. ex50:    unlk    R14            ; prepare for return
  75.     rts
  76.     .data
  77.     end 
  78. #-------------------- cut here, save as RES25PRG.S -------------------------
  79. *
  80. *  Make hi rez screen bios handle 25 lines of 8x16 characters
  81. *
  82. *  Simply as68 this, then link it, no libraries needed
  83.         .text
  84.         .globl _hi25
  85. LINEA_I        equ     $A000 
  86. GET_REZ        equ     4           ; extended bios resolution inquiry
  87. _hi25: 
  88.     lea     stack,sp 
  89.     move.w  #GET_REZ,-(sp)      ; get screen resolution
  90.     trap    #14 
  91.     addq.w  #2,sp
  92.     cmp.w   #2,d0               ; only execute if already in hi rez
  93.     bne     exit 
  94.     dc.w    LINEA_I          ; get the important pointers 
  95.     move.l  08(a1),a1           ; a1 -> 8x16 font header 
  96.     move.l  72(a1),-$0A(a0)     ; v_off_ad <- 8x16 offset table ad
  97.     move.l  76(a1),-$16(a0)     ; v_fnt_ad <- 8x16 font data addr 
  98.     move.w  #0016,-$2E(a0)      ; v_cel_ht <- 16    8x16 cell heigh
  99.     move.w  #0024,-$2A(a0)      ; v_cel_my <- 24    maximum cell "Y" 
  100.     move.w  #1280,-$28(a0)      ; v_cel_wr <- 1280  vertical byte offset
  101. exit:   clr.w   -(sp)               ; back to the os 
  102.     trap    #1 
  103.     ds.l    $10
  104. stack:  ds.l    $01                 ; hey chef, gimme a short stack
  105.     end 
  106. #-------------------- cut here, save as RES50PRG.S -------------------------
  107. *
  108. *  Make hi rez screen bios handle 25 lines of 8x16 characters
  109. *
  110. *  Simply as68 this, then link it, no libraries needed
  111. *
  112.         .text
  113.         .globl _hi50
  114. LINEA_I        equ     $A000 
  115. GET_REZ        equ     4           ; extended bios resolution inquiry
  116. _hi50: 
  117.     lea     stack,sp 
  118.     move.w  #GET_REZ,-(sp)      ; get screen resolution
  119.     trap    #14 
  120.     addq.w  #2,sp
  121.     cmp.w   #2,d0               ; only execute if already in hi rez
  122.     bne     exit 
  123.     dc.w    LINEA_I          ; get the important pointers 
  124.     move.l  04(a1),a1           ; a1 -> 8x8 font header 
  125.     move.l  72(a1),-$0A(a0)     ; v_off_ad <- 8x8 offset table ad
  126.     move.l  76(a1),-$16(a0)     ; v_fnt_ad <- 8x8 font data addr 
  127.     move.w  #008,-$2E(a0)        ; v_cel_ht <- 8    8x8 cell heigh
  128.     move.w  #0049,-$2A(a0)      ; v_cel_my <- 49    maximum cell "Y" 
  129.     move.w  #640,-$28(a0)        ; v_cel_wr <- 640  vertical byte offset
  130. exit:   clr.w   -(sp)               ; back to the os 
  131.     trap    #1 
  132.     ds.l    $10
  133. stack:  ds.l    $01                 ; hey chef, gimme a short stack
  134.     end 
  135. #-------------------- cut here, save as STDIOTVX.H -------------------------
  136. /* stdio.h fixed to make it compatible with the rest of the world */
  137.  
  138. #define mc68k 0
  139.  
  140. #define TRUE 1
  141. #define FALSE 0
  142.  
  143. #define    NULL    0
  144. #define NULLPTR (char *) 0
  145. #define    EOF    (-1)
  146.  
  147. #define BUFSIZ    512
  148. #define MAXFILES    16
  149. struct _iobuf {    
  150.     int _fd;
  151.     int _flag;
  152.     char *_base;
  153.     char *_ptr;
  154.     int _cnt;
  155. };
  156.  
  157. #ifndef FILE
  158. extern struct _iobuf _iob[MAXFILES];
  159. #define FILE struct _iobuf
  160. #endif
  161. #define NULLFILE ((FILE *)0)
  162.  
  163. #define _IOREAD    0x01
  164. #define _IOWRT    0x02
  165. #define _IOABUF    0x04
  166. #define _IONBUF    0x08
  167. #define _IOERR    0x10
  168. #define _IOEOF    0x20
  169. #define _IOLBUF 0x40
  170. #define _IOSTRI    0x80
  171. #define _IOASCI    0x100
  172.  
  173. #define stdin  (&_iob[0])
  174. #define stdout (&_iob[1])
  175. #define stderr (&_iob[2])
  176.  
  177. #define clearerr(p) ((p)->_flag &= ~_IOERR)
  178. #define feof(p) ((p)->_flag & _IOEOF)
  179. #define ferror(p) ((p)->_flag & _IOERR)
  180. #define fileno(p) ((p)->_fd)
  181. #define getchar() getc(stdin)
  182. #define putchar(c) putc(c,stdout)
  183. #define putc fputc
  184. #define getc fgetc
  185.  
  186.  
  187. #define    abs(x)    ((x) < 0 ? -(x) : (x))
  188.  
  189. #define MAX(x,y)   (((x) > (y)) ? (x) :  (y))
  190. #define    MIN(x,y)   (((x) < (y)) ? (x) :  (y))
  191. #define max(x,y)   (((x) > (y)) ? (x) :  (y))
  192. #define    min(x,y)   (((x) < (y)) ? (x) :  (y))
  193.  
  194. /*************************** end of stdio.h *********************************/
  195. #-------------------- cut here, save as CTVX.BAT -------------------------
  196. a:as68 -l -u -s a: b:hires.s
  197. a:cp68 -p -I A: tvx_1.c tvx_1.i
  198. a:c068 tvx_1.i tvx_1.1 tvx_1.2 tvx_1.3 -f
  199. a:rm tvx_1.i
  200. a:c168 tvx_1.1 tvx_1.2 tvx1.s
  201. a:rm tvx_1.1
  202. a:rm tvx_1.2
  203. a:as68 -l -u -s a: b:tvx1.s
  204. a:rm b:tvx1.s
  205. a:cp68 -p -I A: tvx_2.c tvx_2.i
  206. a:c068 tvx_2.i tvx_2.1 tvx_2.2 tvx_2.3 -f
  207. a:rm tvx_2.i
  208. a:c168 tvx_2.1 tvx_2.2 tvx2.s
  209. a:rm tvx_2.1
  210. a:rm tvx_2.2
  211. a:as68 -l -u -s a: b:tvx2.s
  212. a:rm b:tvx2.s
  213. a:cp68 -p -I A: tvx_io.c tvx_io.i
  214. a:c068 tvx_io.i tvx_io.1 tvx_io.2 tvx_io.3 -f
  215. a:rm tvx_io.i
  216. a:c168 tvx_io.1 tvx_io.2 tvxio.s
  217. a:rm tvx_io.1
  218. a:rm tvx_io.2
  219. a:as68 -l -u -s a: b:tvxio.s
  220. a:rm b:tvxio.s
  221. a:cp68 -p -I A: tvx_lib.c tvx_lib.i
  222. a:c068 tvx_lib.i tvx_lib.1 tvx_lib.2 tvx_lib.3 -f
  223. a:rm tvx_lib.i
  224. a:c168 tvx_lib.1 tvx_lib.2 tvxlib.s
  225. a:rm tvx_lib.1
  226. a:rm tvx_lib.2
  227. a:as68 -l -u -s a: b:tvxlib.s
  228. a:rm b:tvxlib.s
  229. a:cp68 -p -I A: tvx_edit.c tvx_edit.i
  230. a:c068 tvx_edit.i tvx_edit.1 tvx_edit.2 tvx_edit.3 -f
  231. a:rm tvx_edit.i
  232. a:c168 tvx_edit.1 tvx_edit.2 tvxedit.s
  233. a:rm tvx_edit.1
  234. a:rm tvx_edit.2
  235. a:as68 -l -u -s a: b:tvxedit.s
  236. a:rm b:tvxedit.s
  237. a:cp68 -p -I A: tvx_lex.c tvx_lex.i
  238. a:c068 tvx_lex.i tvx_lex.1 tvx_lex.2 tvx_lex.3 -f
  239. a:rm tvx_lex.i
  240. a:c168 tvx_lex.1 tvx_lex.2 tvxlex.s
  241. a:rm tvx_lex.1
  242. a:rm tvx_lex.2
  243. a:as68 -l -u -s a: b:tvxlex.s
  244. a:rm b:tvxlex.s
  245. #-------------------- cut here, save as LINKTVX.BAT -------------------------
  246. link68 [u] B:tvx.68k=gems,b:tvx1,b:tvx2,b:tvxedit,b:tvxlex,b:tvxio,b:tvxlib,b:hires,osbind,gemlib
  247. relmod b:tvx
  248. rm b:tvx.68K
  249. #-------------------- END OF ATARI SPECIAL FILES -------------------------
  250.  
  251.