Browse Source

Create dgg development branch

import/raw
wayne 13 years ago
parent
commit
e1c4ebe372
  1. BIN
      branches/dgg/Apps/apps-bins/access.com
  2. BIN
      branches/dgg/Apps/apps-bins/chars.com
  3. BIN
      branches/dgg/Apps/apps-bins/cls.com
  4. BIN
      branches/dgg/Apps/apps-bins/cpmname.com
  5. BIN
      branches/dgg/Apps/apps-bins/diskcopy.com
  6. BIN
      branches/dgg/Apps/apps-bins/findfile.com
  7. BIN
      branches/dgg/Apps/apps-bins/label.com
  8. BIN
      branches/dgg/Apps/apps-bins/ls.com
  9. BIN
      branches/dgg/Apps/apps-bins/map.com
  10. BIN
      branches/dgg/Apps/apps-bins/meta.com
  11. BIN
      branches/dgg/Apps/apps-bins/multifmt.com
  12. BIN
      branches/dgg/Apps/apps-bins/noaccess.com
  13. BIN
      branches/dgg/Apps/apps-bins/rem.com
  14. BIN
      branches/dgg/Apps/apps-bins/setlabel.com
  15. BIN
      branches/dgg/Apps/apps-bins/stop.com
  16. BIN
      branches/dgg/Apps/apps-bins/sysgen.com
  17. BIN
      branches/dgg/Apps/apps-bins/termtype.com
  18. BIN
      branches/dgg/Apps/apps-bins/view.com
  19. 338
      branches/dgg/Apps/apps-srcs/TESTV5.BAS
  20. BIN
      branches/dgg/Apps/apps-srcs/sources.lbr
  21. 28
      branches/dgg/Apps/apps-srcs/testv5.c
  22. BIN
      branches/dgg/Apps/apps-srcs/testv5.cmd
  23. 4
      branches/dgg/Apps/apps-srcs/testv5.sub
  24. 473
      branches/dgg/Apps/apps-srcs/tms9918.h
  25. BIN
      branches/dgg/Apps/core/access.com
  26. BIN
      branches/dgg/Apps/core/cpmname.com
  27. BIN
      branches/dgg/Apps/core/findfile.com
  28. BIN
      branches/dgg/Apps/core/map.com
  29. BIN
      branches/dgg/Apps/core/meta.com
  30. BIN
      branches/dgg/Apps/core/multifmt.com
  31. BIN
      branches/dgg/Apps/core/noaccess.com
  32. BIN
      branches/dgg/Apps/core/rem.com
  33. BIN
      branches/dgg/Apps/core/setlabel.com
  34. BIN
      branches/dgg/Apps/core/sysgen.com
  35. BIN
      branches/dgg/Apps/core/termtype.com
  36. BIN
      branches/dgg/Apps/core/view.com
  37. 20
      branches/dgg/Apps/crossdev/APPLVERS.H
  38. 67
      branches/dgg/Apps/crossdev/ASMIFACE.ASM
  39. 14
      branches/dgg/Apps/crossdev/ASMIFACE.H
  40. 4
      branches/dgg/Apps/crossdev/BANNER.H
  41. 71
      branches/dgg/Apps/crossdev/BDOSCALL.ASM
  42. 8
      branches/dgg/Apps/crossdev/BDOSCALL.H
  43. BIN
      branches/dgg/Apps/crossdev/BIN/AS80.EXE
  44. BIN
      branches/dgg/Apps/crossdev/BIN/CCZ.EXE
  45. BIN
      branches/dgg/Apps/crossdev/BIN/HEX80.EXE
  46. BIN
      branches/dgg/Apps/crossdev/BIN/LIBUTIL.EXE
  47. BIN
      branches/dgg/Apps/crossdev/BIN/LN80.EXE
  48. BIN
      branches/dgg/Apps/crossdev/BIN/MAKE.EXE
  49. 80
      branches/dgg/Apps/crossdev/BIOSCALL.ASM
  50. 8
      branches/dgg/Apps/crossdev/BIOSCALL.H
  51. BIN
      branches/dgg/Apps/crossdev/C.LIB
  52. 41
      branches/dgg/Apps/crossdev/CBANNER.C
  53. 1
      branches/dgg/Apps/crossdev/CBANNER.H
  54. 133
      branches/dgg/Apps/crossdev/CHARS.C
  55. 57
      branches/dgg/Apps/crossdev/CLOGICAL.C
  56. 18
      branches/dgg/Apps/crossdev/CLOGICAL.H
  57. 53
      branches/dgg/Apps/crossdev/CMEMORY.C
  58. 108
      branches/dgg/Apps/crossdev/CNAMEPT1.C
  59. 113
      branches/dgg/Apps/crossdev/CNAMEPT2.C
  60. 216
      branches/dgg/Apps/crossdev/CNAMEPT3.C
  61. 198
      branches/dgg/Apps/crossdev/CNAMEPT4.C
  62. 73
      branches/dgg/Apps/crossdev/CNFGDATA.H
  63. 196
      branches/dgg/Apps/crossdev/CPM80.H
  64. BIN
      branches/dgg/Apps/crossdev/CPM86/AME86.EXE
  65. BIN
      branches/dgg/Apps/crossdev/CPM86/AME86DOS.EXE
  66. BIN
      branches/dgg/Apps/crossdev/CPM86/ARCV.COM
  67. BIN
      branches/dgg/Apps/crossdev/CPM86/AS.EXE
  68. 8
      branches/dgg/Apps/crossdev/CPM86/ASSERT.H
  69. BIN
      branches/dgg/Apps/crossdev/CPM86/C.LIB
  70. BIN
      branches/dgg/Apps/crossdev/CPM86/CC.EXE
  71. BIN
      branches/dgg/Apps/crossdev/CPM86/CCB.EXE
  72. BIN
      branches/dgg/Apps/crossdev/CPM86/CNM.EXE
  73. BIN
      branches/dgg/Apps/crossdev/CPM86/CPM.EXE
  74. BIN
      branches/dgg/Apps/crossdev/CPM86/CRC.EXE
  75. 20
      branches/dgg/Apps/crossdev/CPM86/CTYPE.H
  76. BIN
      branches/dgg/Apps/crossdev/CPM86/D11.LIB
  77. BIN
      branches/dgg/Apps/crossdev/CPM86/D20.LIB
  78. BIN
      branches/dgg/Apps/crossdev/CPM86/DIFF.EXE
  79. 26
      branches/dgg/Apps/crossdev/CPM86/DIOCTL.H
  80. 29
      branches/dgg/Apps/crossdev/CPM86/ERRNO.H
  81. 7
      branches/dgg/Apps/crossdev/CPM86/FCNTL.H
  82. BIN
      branches/dgg/Apps/crossdev/CPM86/G.LIB
  83. 16
      branches/dgg/Apps/crossdev/CPM86/GRAPH.C
  84. BIN
      branches/dgg/Apps/crossdev/CPM86/GRAPH.EXE
  85. BIN
      branches/dgg/Apps/crossdev/CPM86/GRAPH.O
  86. 4
      branches/dgg/Apps/crossdev/CPM86/HELLO.C
  87. BIN
      branches/dgg/Apps/crossdev/CPM86/HELLO.CMD
  88. BIN
      branches/dgg/Apps/crossdev/CPM86/HELLO.EXE
  89. BIN
      branches/dgg/Apps/crossdev/CPM86/HELLO.O
  90. BIN
      branches/dgg/Apps/crossdev/CPM86/HEX86.EXE
  91. 82
      branches/dgg/Apps/crossdev/CPM86/IO.H
  92. 41
      branches/dgg/Apps/crossdev/CPM86/LIBC.H
  93. 210
      branches/dgg/Apps/crossdev/CPM86/LMACROS.H
  94. BIN
      branches/dgg/Apps/crossdev/CPM86/LN.EXE
  95. BIN
      branches/dgg/Apps/crossdev/CPM86/M.LIB
  96. BIN
      branches/dgg/Apps/crossdev/CPM86/M87.LIB
  97. BIN
      branches/dgg/Apps/crossdev/CPM86/M87S.LIB
  98. BIN
      branches/dgg/Apps/crossdev/CPM86/MAKE.EXE
  99. 8
      branches/dgg/Apps/crossdev/CPM86/MAKEFILE
  100. 1
      branches/dgg/Apps/crossdev/CPM86/MAP.BAT

BIN
branches/dgg/Apps/apps-bins/access.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/chars.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/cls.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/cpmname.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/diskcopy.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/findfile.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/label.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/ls.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/map.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/meta.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/multifmt.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/noaccess.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/rem.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/setlabel.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/stop.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/sysgen.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/termtype.com

Binary file not shown.

BIN
branches/dgg/Apps/apps-bins/view.com

Binary file not shown.

338
branches/dgg/Apps/apps-srcs/TESTV5.BAS

@ -0,0 +1,338 @@
5 PRINT "Simple VIDEO test for N8-2511; I/O Base is assumed as 128"
10 BASE=128
20 DATAP=BASE+24
30 CMDP=BASE+25
40 GOTO 140
50 PRINT "Let's set VDP write address to #0000"
60 OUT CMDP,0
70 OUT CMDP,64 :REM 40H
80 REM NOW LET's clear first 16Kb of VDP memory
90 PRINT "NOW LET's clear first 16Kb of VDP memory"
100 FOR A=0 TO 16383
110 REM PRINT "ADDR:";HEX$(A);CHR$(13);
120 OUT DATAP,0
130 NEXT A
140 PRINT "Now it is time to set up VDP registers"
160 REM Register 0 to #0
170 REM Set mode selection bit M3 (maybe also M4 & M5) to zero and
180 REM disable external video & horizontal interrupt
190 OUT CMDP,0
200 OUT CMDP,128 :REM 80h
210 REM Register 1 to #50
220 PRINT "Select 40 column mode, enable screen and disable vertical interrupt"
230 OUT CMDP,80 :REM 50h
240 OUT CMDP,129 :REM 81h
250 REM Register 2 to #0
260 PRINT "Set pattern name table to #0000"
270 OUT CMDP,0
280 OUT CMDP,130 :REM 82H
290 REM REGISTER 3 IS IGNORED AS 40 COLUMN MODE DOES NOT NEED COLOR TABLE
300 REM Register 4 to #1
310 PRINT "SET PATTERN GENERATOR TABLE TO #800"
320 OUT CMDP,1
330 OUT CMDP,132 :REM 84h
340 REM Registers 5 (Sprite attribute) & 6 (Sprite pattern) are ignored
350 REM as 40 column mode does not have sprites
360 REM Register 7 to #F0
370 PRINT "Set colors to white on black"
380 OUT CMDP,240 :REM F0h
390 OUT CMDP,135 :REM 87h
400 REM Let's set VDP write address to #800 so, that we can write
410 REM character set to memory
430 OUT CMDP,0
440 OUT CMDP,72 :REM 48h
450 REM Create a character set
460 PRINT "Create a character set"
470 FOR C=0 TO 255
480 FOR D=0 TO 7
500 READ V
510 OUT DATAP,V
520 NEXT D
530 NEXT C
540 REM Let's set write address to start of name table
550 PRINT "LET's put characters to screen"
555 D=0
560 OUT CMDP,0
570 OUT CMDP,64 :REM 40h
580 REM LET's put characters to screen
600 FOR C=0 TO ((40 * 24) - 1)
610 OUT DATAP,D
620 D=D+1
630 IF D=128 THEN D=0
640 NEXT C
700 BASE=128
710 DATAP=BASE+24
720 CMDP=BASE+25
730 OUT CMDP,0
740 OUT CMDP,0
750 FOR C=0 TO 16
760 V = INP(DATAP)
770 PRINT HEX$(V)
780 NEXT C
790 STOP
800 BASE=128
810 DATAP=BASE+24
820 CMDP=BASE+25
830 FOR C=0 TO 255
840 PRINT HEX$(C)
850 OUT CMDP,C
860 OUT CMDP,135 :REM REGISTER 7
870 INPUT "<RET> TO CONTINUE",A$
880 NEXT C
890 END
10000 DATA 0,0,0,0,0,0,0,0
10001 DATA 0,0,0,60,60,48,48,48
10002 DATA 0,0,0,240,240,48,48,48
10003 DATA 48,48,48,60,60,0,0,0
10004 DATA 48,48,48,240,240,0,0,0
10005 DATA 48,48,48,48,48,48,48,48
10006 DATA 0,0,0,255,255,0,0,0
10007 DATA 0,32,112,248,112,32,0,0
10008 DATA 248,216,136,0,136,216,248,0
10009 DATA 0,0,0,0,0,0,0,0
10010 DATA 0,0,0,0,0,0,0,0
10011 DATA 24,24,32,96,144,96,0,0
10012 DATA 32,80,32,32,112,32,0,0
10013 DATA 0,0,0,0,0,0,0,0
10014 DATA 0,0,0,0,0,0,0,0
10015 DATA 168,80,80,216,80,80,168,0
10016 DATA 48,48,48,252,252,48,48,48
10017 DATA 16,48,112,240,112,48,16,0
10018 DATA 32,112,32,32,32,112,32,0
10019 DATA 80,80,80,80,0,80,0,0
10020 DATA 120,168,168,104,40,40,0,0
10021 DATA 48,48,48,252,252,0,0,0
10022 DATA 0,0,0,252,252,48,48,48
10023 DATA 48,48,48,240,240,48,48,48
10024 DATA 32,112,32,32,32,32,32,32
10025 DATA 48,48,48,60,60,48,48,48
10026 DATA 0,16,24,252,24,16,0,0
10027 DATA 0,32,96,252,96,32,0,0
10028 DATA 0,0,0,0,0,0,0,0
10029 DATA 0,0,0,0,0,0,0,0
10030 DATA 0,0,0,0,0,0,0,0
10031 DATA 0,0,0,0,0,0,0,0
10032 DATA 0,0,0,0,0,0,0,0
10033 DATA 48,120,120,48,0,48,0,0
10034 DATA 216,216,80,0,0,0,0,0
10035 DATA 72,72,252,72,72,252,72,72
10036 DATA 32,120,160,120,36,248,32,0
10037 DATA 0,200,208,32,88,152,0,0
10038 DATA 48,72,72,80,96,144,120,0
10039 DATA 48,48,64,0,0,0,0,0
10040 DATA 16,32,32,32,32,32,16,0
10041 DATA 32,16,16,16,16,16,32,0
10042 DATA 32,168,112,248,112,168,32,0
10043 DATA 0,32,32,248,32,32,0,0
10044 DATA 0,0,0,0,0,48,48,64
10045 DATA 0,0,0,252,0,0,0,0
10046 DATA 0,0,0,0,0,48,48,0
10047 DATA 4,8,16,32,64,128,0,0
10048 DATA 112,152,168,168,168,200,112,0
10049 DATA 32,96,32,32,32,32,248,0
10050 DATA 32,80,16,32,64,128,248,0
10051 DATA 112,136,8,112,8,136,112,0
10052 DATA 48,80,144,248,16,16,16,0
10053 DATA 248,128,128,240,8,136,112,0
10054 DATA 56,64,128,240,136,136,112,0
10055 DATA 248,8,16,32,32,32,32,0
10056 DATA 112,136,136,112,136,136,112,0
10057 DATA 112,136,136,120,8,136,112,0
10058 DATA 0,48,48,0,48,48,0,0
10059 DATA 0,48,48,0,48,48,96,0
10060 DATA 16,32,64,128,64,32,16,0
10061 DATA 0,0,252,0,252,0,0,0
10062 DATA 64,32,16,8,16,32,64,0
10063 DATA 112,136,8,48,32,0,32,0
10064 DATA 112,136,184,176,128,128,112,0
10065 DATA 32,80,136,248,136,136,136,0
10066 DATA 240,72,72,112,72,72,240,0
10067 DATA 112,136,128,128,128,136,112,0
10068 DATA 240,72,72,72,72,72,240,0
10069 DATA 248,136,128,224,128,136,248,0
10070 DATA 248,136,128,240,128,128,128,0
10071 DATA 112,136,128,184,136,136,112,0
10072 DATA 136,136,136,248,136,136,136,0
10073 DATA 248,32,32,32,32,32,248,0
10074 DATA 28,8,8,8,8,136,112,0
10075 DATA 136,144,160,192,160,144,136,0
10076 DATA 128,128,128,128,128,136,248,0
10077 DATA 136,216,168,136,136,136,136,0
10078 DATA 136,200,168,168,168,152,136,0
10079 DATA 112,136,136,136,136,136,112,0
10080 DATA 240,136,136,240,128,128,128,0
10081 DATA 112,136,136,136,168,152,120,4
10082 DATA 240,136,136,240,160,144,136,0
10083 DATA 112,136,64,32,16,136,112,0
10084 DATA 248,32,32,32,32,32,112,0
10085 DATA 136,136,136,136,136,136,112,0
10086 DATA 136,136,136,80,80,80,32,0
10087 DATA 136,136,136,168,168,168,80,0
10088 DATA 136,136,80,32,80,136,136,0
10089 DATA 136,136,80,32,32,32,32,0
10090 DATA 248,136,16,32,64,136,248,0
10091 DATA 120,64,64,64,64,64,120,0
10092 DATA 0,128,64,32,16,8,0,0
10093 DATA 120,8,8,8,8,8,120,0
10094 DATA 32,80,136,0,0,0,0,0
10095 DATA 0,0,0,0,0,0,252,0
10096 DATA 96,96,16,0,0,0,0,0
10097 DATA 0,0,240,8,120,136,112,0
10098 DATA 128,128,128,240,136,136,240,0
10099 DATA 0,0,0,112,128,128,112,0
10100 DATA 8,8,8,120,136,136,120,0
10101 DATA 0,0,112,136,248,128,112,0
10102 DATA 0,48,72,224,64,64,64,0
10103 DATA 0,0,56,72,72,56,8,112
10104 DATA 0,128,128,176,200,136,136,0
10105 DATA 0,0,32,0,96,32,112,0
10106 DATA 0,8,0,24,8,8,72,48
10107 DATA 128,128,144,160,192,160,144,0
10108 DATA 32,32,32,32,32,32,32,0
10109 DATA 0,0,0,80,168,168,136,0
10110 DATA 0,0,0,176,200,136,136,0
10111 DATA 0,0,0,112,136,136,112,0
10112 DATA 0,0,112,72,72,112,64,64
10113 DATA 0,96,56,72,72,56,8,8
10114 DATA 0,0,0,176,200,128,128,0
10115 DATA 0,0,96,128,96,16,96,0
10116 DATA 0,0,64,224,64,64,32,0
10117 DATA 0,0,0,144,144,144,104,0
10118 DATA 0,0,0,136,136,80,32,0
10119 DATA 0,0,0,136,168,168,80,0
10120 DATA 0,0,0,72,48,48,72,0
10121 DATA 0,0,136,80,32,64,128,0
10122 DATA 0,0,248,16,32,64,248,0
10123 DATA 16,32,32,64,32,32,16,0
10124 DATA 32,32,32,0,32,32,32,0
10125 DATA 64,32,32,16,32,32,64,0
10126 DATA 108,144,0,0,0,0,0,0
10127 DATA 112,80,80,80,80,80,112,0
10128 DATA 0,0,0,0,0,0,0,0
10129 DATA 0,0,0,0,0,0,0,0
10130 DATA 0,0,0,0,0,0,0,0
10131 DATA 0,0,0,0,0,0,0,0
10132 DATA 0,0,0,0,0,0,0,0
10133 DATA 0,0,0,0,0,0,0,0
10134 DATA 0,0,0,0,0,0,0,0
10135 DATA 0,0,0,0,0,0,0,0
10136 DATA 0,0,0,0,0,0,0,0
10137 DATA 0,0,0,0,0,0,0,0
10138 DATA 0,0,0,0,0,0,0,0
10139 DATA 0,0,0,0,0,0,0,0
10140 DATA 0,0,0,0,0,0,0,0
10141 DATA 0,0,0,0,0,0,0,0
10142 DATA 0,0,0,0,0,0,0,0
10143 DATA 0,0,0,0,0,0,0,0
10144 DATA 0,0,0,0,0,0,0,0
10145 DATA 0,0,0,0,0,0,0,0
10146 DATA 0,0,0,0,0,0,0,0
10147 DATA 0,0,0,0,0,0,0,0
10148 DATA 0,0,0,0,0,0,0,0
10149 DATA 0,0,0,0,0,0,0,0
10150 DATA 0,0,0,0,0,0,0,0
10151 DATA 0,0,0,0,0,0,0,0
10152 DATA 0,0,0,0,0,0,0,0
10153 DATA 0,0,0,0,0,0,0,0
10154 DATA 0,0,0,0,0,0,0,0
10155 DATA 0,0,0,0,0,0,0,0
10156 DATA 0,0,0,0,0,0,0,0
10157 DATA 0,0,0,0,0,0,0,0
10158 DATA 0,0,0,0,0,0,0,0
10159 DATA 0,0,0,0,0,0,0,0
10160 DATA 32,64,240,8,120,136,112,0
10161 DATA 16,32,0,96,32,32,248,0
10162 DATA 16,32,0,112,136,136,112,0
10163 DATA 16,32,0,136,136,136,116,0
10164 DATA 16,32,0,176,200,136,136,0
10165 DATA 16,32,0,200,168,152,136,0
10166 DATA 112,136,136,124,0,252,0,0
10167 DATA 112,136,136,112,0,252,0,0
10168 DATA 32,0,32,32,64,136,112,0
10169 DATA 0,0,0,0,252,128,128,128
10170 DATA 0,0,0,0,252,4,4,4
10171 DATA 136,144,168,84,136,28,0,0
10172 DATA 136,144,168,88,184,8,0,0
10173 DATA 48,0,48,120,120,48,0,0
10174 DATA 20,40,80,160,80,40,20,0
10175 DATA 160,80,40,20,40,80,160,0
10176 DATA 84,170,84,170,84,170,84,170
10177 DATA 170,84,170,84,170,84,170,84
10178 DATA 182,108,218,182,108,218,182,108
10179 DATA 24,24,24,24,24,24,24,24
10180 DATA 24,24,24,24,248,24,24,24
10181 DATA 24,24,24,248,24,248,24,24
10182 DATA 108,108,108,108,236,108,108,108
10183 DATA 0,0,0,0,252,108,108,108
10184 DATA 0,0,0,252,108,236,108,108
10185 DATA 108,108,236,12,236,108,108,108
10186 DATA 108,108,108,108,108,108,108,108
10187 DATA 0,0,252,14,238,108,108,108
10188 DATA 108,108,236,12,252,0,0,0
10189 DATA 100,100,252,0,0,0,0,0
10190 DATA 48,48,240,48,48,240,0,0
10191 DATA 0,0,0,0,240,48,48,48
10192 DATA 48,48,48,48,60,0,0,0
10193 DATA 48,48,48,48,252,0,0,0
10194 DATA 0,0,0,0,252,48,48,48
10195 DATA 48,48,48,48,60,48,48,48
10196 DATA 0,0,0,0,252,0,0,0
10197 DATA 48,48,48,48,252,48,48,48
10198 DATA 48,48,60,48,60,48,48,48
10199 DATA 216,216,220,216,216,216,216,216
10200 DATA 216,216,216,220,192,252,0,0
10201 DATA 0,0,0,252,192,220,216,216
10202 DATA 216,216,216,220,192,0,252,0
10203 DATA 0,0,0,0,0,0,252,0
10204 DATA 216,216,216,220,192,220,216,216
10205 DATA 0,0,0,252,0,252,0,0
10206 DATA 216,216,216,220,0,220,216,216
10207 DATA 48,48,48,252,0,0,252,0
10208 DATA 216,216,216,252,0,0,0,0
10209 DATA 0,0,252,0,0,252,48,48
10210 DATA 0,0,0,0,0,252,216,216
10211 DATA 216,216,216,252,0,0,0,0
10212 DATA 48,48,48,60,48,48,60,0
10213 DATA 0,0,0,62,48,62,48,48
10214 DATA 0,0,0,0,0,252,216,216
10215 DATA 216,216,216,216,220,216,216,216
10216 DATA 48,48,252,0,0,252,48,48
10217 DATA 48,48,48,240,0,0,0,0
10218 DATA 0,0,0,60,48,48,48,48
10219 DATA 252,252,252,252,252,252,252,252
10220 DATA 0,0,0,252,252,252,192,192
10221 DATA 192,192,192,192,192,192,192,192
10222 DATA 12,12,12,12,12,12,12,12
10223 DATA 12,12,12,12,252,252,252,0
10224 DATA 0,0,0,104,144,144,104,0
10225 DATA 112,136,136,176,136,136,240,64
10226 DATA 240,144,128,128,128,128,128,0
10227 DATA 248,80,80,80,80,72,0,0
10228 DATA 248,136,64,32,64,136,248,0
10229 DATA 0,0,0,124,136,136,112,0
10230 DATA 0,0,0,136,136,136,112,128
10231 DATA 0,0,116,152,16,16,28,0
10232 DATA 252,16,56,68,56,16,252,0
10233 DATA 48,204,204,252,204,204,56,0
10234 DATA 120,132,132,132,72,72,132,0
10235 DATA 60,64,56,68,68,68,56,0
10236 DATA 0,0,108,146,146,108,0,0
10237 DATA 0,0,0,56,88,104,112,0
10238 DATA 56,64,128,248,128,64,56,0
10239 DATA 0,0,48,204,204,204,204,0
10240 DATA 252,0,0,252,0,0,252,0
10241 DATA 16,16,124,16,16,0,254,0
10242 DATA 32,16,8,16,32,0,254,0
10243 DATA 16,32,64,32,16,0,254,0
10244 DATA 24,52,48,48,48,48,48,48
10245 DATA 48,48,48,48,48,48,176,112
10246 DATA 48,48,0,252,0,48,48,0
10247 DATA 0,100,152,0,100,152,0,0
10248 DATA 56,68,68,56,0,0,0,0
10249 DATA 0,56,56,0,0,0,0,0
10250 DATA 0,0,56,0,0,0,0,0
10251 DATA 14,8,8,72,40,24,8,0
10252 DATA 0,0,0,176,72,72,72,0
10253 DATA 0,0,240,60,64,128,248,0
10254 DATA 252,252,252,252,252,252,252,252
10255 DATA 0,0,0,0,0,0,0,0

BIN
branches/dgg/Apps/apps-srcs/sources.lbr

Binary file not shown.

28
branches/dgg/Apps/apps-srcs/testv5.c

@ -0,0 +1,28 @@
/* testv5.c 8/30/2012 dwg - derived from Wayne's TESTV5.BAS */
/* Simple VIDEO test for N8; I/O Base assumed as 128 */
#include "tms9918.h"
int main(argc,argv)
int argc;
char *argv[];
{
vdp_clr16k();
vdp_setregs();
vdp_modes();
vdp_pnt();
vdp_pgt();
vdp_colors();
vdp_load_set450();
/* vdp_clr_regen(); */
vdp_fill();
/* vdp_num_regen(); */
/* vdp_clr_regen(); */
/* vdp_sync_regen(); */
func700();
/* vdp_display(); */
}


BIN
branches/dgg/Apps/apps-srcs/testv5.cmd

Binary file not shown.

4
branches/dgg/Apps/apps-srcs/testv5.sub

@ -0,0 +1,4 @@
cc testv5
as testv5
ln testv5.o -lc


473
branches/dgg/Apps/apps-srcs/tms9918.h

@ -0,0 +1,473 @@
/* tms9918.h 8/31/2012 dwg - information from TI Docs */
/* http://www1.cs.columbia.edu/~sedwards/papers/TMS9918.pdf */
/* TMS9918 Modes:
Graphics I
Grtaphics Mode I provides 256x192 pixel display for generating
pattern graphics in 15 colors plus transparent.
Graphics II
Graphics mode II is an enhancement of Graphics Mode I, allowing
it to generate more complex color and pattern displays.
Multicolor
The Muylticolor mode provides an unrestricted 64x48
color-dot display employing 15 colors plus transparent.
Text Mode
The Text Mode provides twenty-four 40-character in two colors
and is intended to maximize the capacity of the TV screen to
display alphanumeric characters. (24 lines of forty blocks (each 8x8).
*/
#define BASE 128
#define DATAP (BASE+24)
#define CMDP (BASE+25)
#define WO_R0
#define WOR0B6
#define VDP_TRANSPARENT 0
#define VDP_BLACK 1
#define VDP_MED_GREEN 2
#define VDP_LGREEN 3
#define VDP_DBLUE 4
#define VDP_LBLUE 5
#define VDP_DRED 6
#define VDP_CYAN 7
#define VDP_MRED 8
#define VDP_LRED 9
#define VDP_DYELLOW 10
#define VDP_LYELLOW 11
#define VDP_DGREEN 12
#define VDP_MAGENTA 13
#define VDP_GRAY 14
#define VDP_WHITE 15
unsigned char regen[24*40];
unsigned char data[256*8] = {
/* 10000 */ 0,0,0,0,0,0,0,0,
/* 10001 */ 0,0,0,60,60,48,48,48,
/* 10002 */ 0,0,0,240,240,48,48,48,
/* 10003 */ 48,48,48,60,60,0,0,0,
/* 10004 */ 48,48,48,240,240,0,0,0,
/* 10005 */ 48,48,48,48,48,48,48,48,
/* 10006 */ 0,0,0,255,255,0,0,0,
/* 10007 */ 0,32,112,248,112,32,0,0,
/* 10008 */ 248,216,136,0,136,216,248,0,
/* 10009 */ 0,0,0,0,0,0,0,0,
/* 10010 */ 0,0,0,0,0,0,0,0,
/* 10011 */ 24,24,32,96,144,96,0,0,
/* 10012 */ 32,80,32,32,112,32,0,0,
/* 10013 */ 0,0,0,0,0,0,0,0,
/* 10014 */ 0,0,0,0,0,0,0,0,
/* 10015 */ 168,80,80,216,80,80,168,0,
/* 10016 */ 48,48,48,252,252,48,48,48,
/* 10017 */ 16,48,112,240,112,48,16,0,
/* 10018 */ 32,112,32,32,32,112,32,0,
/* 10019 */ 80,80,80,80,0,80,0,0,
/* 10020 */ 120,168,168,104,40,40,0,0,
/* 10021 */ 48,48,48,252,252,0,0,0,
/* 10022 */ 0,0,0,252,252,48,48,48,
/* 10023 */ 48,48,48,240,240,48,48,48,
/* 10024 */ 32,112,32,32,32,32,32,32,
/* 10025 */ 48,48,48,60,60,48,48,48,
/* 10026 */ 0,16,24,252,24,16,0,0,
/* 10027 */ 0,32,96,252,96,32,0,0,
/* 10028 */ 0,0,0,0,0,0,0,0,
/* 10029 */ 0,0,0,0,0,0,0,0,
/* 10030 */ 0,0,0,0,0,0,0,0,
/* 10031 */ 0,0,0,0,0,0,0,0,
/* 10032 */ 0,0,0,0,0,0,0,0,
/* 10033 */ 48,120,120,48,0,48,0,0,
/* 10034 */ 216,216,80,0,0,0,0,0,
/* 10035 */ 72,72,252,72,72,252,72,72,
/* 10036 */ 32,120,160,120,36,248,32,0,
/* 10037 */ 0,200,208,32,88,152,0,0,
/* 10038 */ 48,72,72,80,96,144,120,0,
/* 10039 */ 48,48,64,0,0,0,0,0,
/* 10040 */ 16,32,32,32,32,32,16,0,
/* 10041 */ 32,16,16,16,16,16,32,0,
/* 10042 */ 32,168,112,248,112,168,32,0,
/* 10043 */ 0,32,32,248,32,32,0,0,
/* 10044 */ 0,0,0,0,0,48,48,64,
/* 10045 */ 0,0,0,252,0,0,0,0,
/* 10046 */ 0,0,0,0,0,48,48,0,
/* 10047 */ 4,8,16,32,64,128,0,0,
/* 10048 */ 112,152,168,168,168,200,112,0,
/* 10049 */ 32,96,32,32,32,32,248,0,
/* 10050 */ 32,80,16,32,64,128,248,0,
/* 10051 */ 112,136,8,112,8,136,112,0,
/* 10052 */ 48,80,144,248,16,16,16,0,
/* 10053 */ 248,128,128,240,8,136,112,0,
/* 10054 */ 56,64,128,240,136,136,112,0,
/* 10055 */ 248,8,16,32,32,32,32,0,
/* 10056 */ 112,136,136,112,136,136,112,0,
/* 10057 */ 112,136,136,120,8,136,112,0,
/* 10058 */ 0,48,48,0,48,48,0,0,
/* 10059 */ 0,48,48,0,48,48,96,0,
/* 10060 */ 16,32,64,128,64,32,16,0,
/* 10061 */ 0,0,252,0,252,0,0,0,
/* 10062 */ 64,32,16,8,16,32,64,0,
/* 10063 */ 112,136,8,48,32,0,32,0,
/* 10064 */ 112,136,184,176,128,128,112,0,
/* 10065 */ 32,80,136,248,136,136,136,0,
/* 10066 */ 240,72,72,112,72,72,240,0,
/* 10067 */ 112,136,128,128,128,136,112,0,
/* 10068 */ 240,72,72,72,72,72,240,0,
/* 10069 */ 248,136,128,224,128,136,248,0,
/* 10070 */ 248,136,128,240,128,128,128,0,
/* 10071 */ 112,136,128,184,136,136,112,0,
/* 10072 */ 136,136,136,248,136,136,136,0,
/* 10073 */ 248,32,32,32,32,32,248,0,
/* 10074 */ 28,8,8,8,8,136,112,0,
/* 10075 */ 136,144,160,192,160,144,136,0,
/* 10076 */ 128,128,128,128,128,136,248,0,
/* 10077 */ 136,216,168,136,136,136,136,0,
/* 10078 */ 136,200,168,168,168,152,136,0,
/* 10079 */ 112,136,136,136,136,136,112,0,
/* 10080 */ 240,136,136,240,128,128,128,0,
/* 10081 */ 112,136,136,136,168,152,120,4,
/* 10082 */ 240,136,136,240,160,144,136,0,
/* 10083 */ 112,136,64,32,16,136,112,0,
/* 10084 */ 248,32,32,32,32,32,112,0,
/* 10085 */ 136,136,136,136,136,136,112,0,
/* 10086 */ 136,136,136,80,80,80,32,0,
/* 10087 */ 136,136,136,168,168,168,80,0,
/* 10088 */ 136,136,80,32,80,136,136,0,
/* 10089 */ 136,136,80,32,32,32,32,0,
/* 10090 */ 248,136,16,32,64,136,248,0,
/* 10091 */ 120,64,64,64,64,64,120,0,
/* 10092 */ 0,128,64,32,16,8,0,0,
/* 10093 */ 120,8,8,8,8,8,120,0,
/* 10094 */ 32,80,136,0,0,0,0,0,
/* 10095 */ 0,0,0,0,0,0,252,0,
/* 10096 */ 96,96,16,0,0,0,0,0,
/* 10097 */ 0,0,240,8,120,136,112,0,
/* 10098 */ 128,128,128,240,136,136,240,0,
/* 10099 */ 0,0,0,112,128,128,112,0,
/* 10100 */ 8,8,8,120,136,136,120,0,
/* 10101 */ 0,0,112,136,248,128,112,0,
/* 10102 */ 0,48,72,224,64,64,64,0,
/* 10103 */ 0,0,56,72,72,56,8,112,
/* 10104 */ 0,128,128,176,200,136,136,0,
/* 10105 */ 0,0,32,0,96,32,112,0,
/* 10106 */ 0,8,0,24,8,8,72,48,
/* 10107 */ 128,128,144,160,192,160,144,0,
/* 10108 */ 32,32,32,32,32,32,32,0,
/* 10109 */ 0,0,0,80,168,168,136,0,
/* 10110 */ 0,0,0,176,200,136,136,0,
/* 10111 */ 0,0,0,112,136,136,112,0,
/* 10112 */ 0,0,112,72,72,112,64,64,
/* 10113 */ 0,96,56,72,72,56,8,8,
/* 10114 */ 0,0,0,176,200,128,128,0,
/* 10115 */ 0,0,96,128,96,16,96,0,
/* 10116 */ 0,0,64,224,64,64,32,0,
/* 10117 */ 0,0,0,144,144,144,104,0,
/* 10118 */ 0,0,0,136,136,80,32,0,
/* 10119 */ 0,0,0,136,168,168,80,0,
/* 10120 */ 0,0,0,72,48,48,72,0,
/* 10121 */ 0,0,136,80,32,64,128,0,
/* 10122 */ 0,0,248,16,32,64,248,0,
/* 10123 */ 16,32,32,64,32,32,16,0,
/* 10124 */ 32,32,32,0,32,32,32,0,
/* 10125 */ 64,32,32,16,32,32,64,0,
/* 10126 */ 108,144,0,0,0,0,0,0,
/* 10127 */ 112,80,80,80,80,80,112,0,
/* 10128 */ 0,0,0,0,0,0,0,0,
/* 10129 */ 0,0,0,0,0,0,0,0,
/* 10130 */ 0,0,0,0,0,0,0,0,
/* 10131 */ 0,0,0,0,0,0,0,0,
/* 10132 */ 0,0,0,0,0,0,0,0,
/* 10133 */ 0,0,0,0,0,0,0,0,
/* 10134 */ 0,0,0,0,0,0,0,0,
/* 10135 */ 0,0,0,0,0,0,0,0,
/* 10136 */ 0,0,0,0,0,0,0,0,
/* 10137 */ 0,0,0,0,0,0,0,0,
/* 10138 */ 0,0,0,0,0,0,0,0,
/* 10139 */ 0,0,0,0,0,0,0,0,
/* 10140 */ 0,0,0,0,0,0,0,0,
/* 10141 */ 0,0,0,0,0,0,0,0,
/* 10142 */ 0,0,0,0,0,0,0,0,
/* 10143 */ 0,0,0,0,0,0,0,0,
/* 10144 */ 0,0,0,0,0,0,0,0,
/* 10145 */ 0,0,0,0,0,0,0,0,
/* 10146 */ 0,0,0,0,0,0,0,0,
/* 10147 */ 0,0,0,0,0,0,0,0,
/* 10148 */ 0,0,0,0,0,0,0,0,
/* 10149 */ 0,0,0,0,0,0,0,0,
/* 10150 */ 0,0,0,0,0,0,0,0,
/* 10151 */ 0,0,0,0,0,0,0,0,
/* 10152 */ 0,0,0,0,0,0,0,0,
/* 10153 */ 0,0,0,0,0,0,0,0,
/* 10154 */ 0,0,0,0,0,0,0,0,
/* 10155 */ 0,0,0,0,0,0,0,0,
/* 10156 */ 0,0,0,0,0,0,0,0,
/* 10157 */ 0,0,0,0,0,0,0,0,
/* 10158 */ 0,0,0,0,0,0,0,0,
/* 10159 */ 0,0,0,0,0,0,0,0,
/* 10160 */ 32,64,240,8,120,136,112,0,
/* 10161 */ 16,32,0,96,32,32,248,0,
/* 10162 */ 16,32,0,112,136,136,112,0,
/* 10163 */ 16,32,0,136,136,136,116,0,
/* 10164 */ 16,32,0,176,200,136,136,0,
/* 10165 */ 16,32,0,200,168,152,136,0,
/* 10166 */ 112,136,136,124,0,252,0,0,
/* 10167 */ 112,136,136,112,0,252,0,0,
/* 10168 */ 32,0,32,32,64,136,112,0,
/* 10169 */ 0,0,0,0,252,128,128,128,
/* 10170 */ 0,0,0,0,252,4,4,4,
/* 10171 */ 136,144,168,84,136,28,0,0,
/* 10172 */ 136,144,168,88,184,8,0,0,
/* 10173 */ 48,0,48,120,120,48,0,0,
/* 10174 */ 20,40,80,160,80,40,20,0,
/* 10175 */ 160,80,40,20,40,80,160,0,
/* 10176 */ 84,170,84,170,84,170,84,170,
/* 10177 */ 170,84,170,84,170,84,170,84,
/* 10178 */ 182,108,218,182,108,218,182,108,
/* 10179 */ 24,24,24,24,24,24,24,24,
/* 10180 */ 24,24,24,24,248,24,24,24,
/* 10181 */ 24,24,24,248,24,248,24,24,
/* 10182 */ 108,108,108,108,236,108,108,108,
/* 10183 */ 0,0,0,0,252,108,108,108,
/* 10184 */ 0,0,0,252,108,236,108,108,
/* 10185 */ 108,108,236,12,236,108,108,108,
/* 10186 */ 108,108,108,108,108,108,108,108,
/* 10187 */ 0,0,252,14,238,108,108,108,
/* 10188 */ 108,108,236,12,252,0,0,0,
/* 10189 */ 100,100,252,0,0,0,0,0,
/* 10190 */ 48,48,240,48,48,240,0,0,
/* 10191 */ 0,0,0,0,240,48,48,48,
/* 10192 */ 48,48,48,48,60,0,0,0,
/* 10193 */ 48,48,48,48,252,0,0,0,
/* 10194 */ 0,0,0,0,252,48,48,48,
/* 10195 */ 48,48,48,48,60,48,48,48,
/* 10196 */ 0,0,0,0,252,0,0,0,
/* 10197 */ 48,48,48,48,252,48,48,48,
/* 10198 */ 48,48,60,48,60,48,48,48,
/* 10199 */ 216,216,220,216,216,216,216,216,
/* 10200 */ 216,216,216,220,192,252,0,0,
/* 10201 */ 0,0,0,252,192,220,216,216,
/* 10202 */ 216,216,216,220,192,0,252,0,
/* 10203 */ 0,0,0,0,0,0,252,0,
/* 10204 */ 216,216,216,220,192,220,216,216,
/* 10205 */ 0,0,0,252,0,252,0,0,
/* 10206 */ 216,216,216,220,0,220,216,216,
/* 10207 */ 48,48,48,252,0,0,252,0,
/* 10208 */ 216,216,216,252,0,0,0,0,
/* 10209 */ 0,0,252,0,0,252,48,48,
/* 10210 */ 0,0,0,0,0,252,216,216,
/* 10211 */ 216,216,216,252,0,0,0,0,
/* 10212 */ 48,48,48,60,48,48,60,0,
/* 10213 */ 0,0,0,62,48,62,48,48,
/* 10214 */ 0,0,0,0,0,252,216,216,
/* 10215 */ 216,216,216,216,220,216,216,216,
/* 10216 */ 48,48,252,0,0,252,48,48,
/* 10217 */ 48,48,48,240,0,0,0,0,
/* 10218 */ 0,0,0,60,48,48,48,48,
/* 10219 */ 252,252,252,252,252,252,252,252,
/* 10220 */ 0,0,0,252,252,252,192,192,
/* 10221 */ 192,192,192,192,192,192,192,192,
/* 10222 */ 12,12,12,12,12,12,12,12,
/* 10223 */ 12,12,12,12,252,252,252,0,
/* 10224 */ 0,0,0,104,144,144,104,0,
/* 10225 */ 112,136,136,176,136,136,240,64,
/* 10226 */ 240,144,128,128,128,128,128,0,
/* 10227 */ 248,80,80,80,80,72,0,0,
/* 10228 */ 248,136,64,32,64,136,248,0,
/* 10229 */ 0,0,0,124,136,136,112,0,
/* 10230 */ 0,0,0,136,136,136,112,128,
/* 10231 */ 0,0,116,152,16,16,28,0,
/* 10232 */ 252,16,56,68,56,16,252,0,
/* 10233 */ 48,204,204,252,204,204,56,0,
/* 10234 */ 120,132,132,132,72,72,132,0,
/* 10235 */ 60,64,56,68,68,68,56,0,
/* 10236 */ 0,0,108,146,146,108,0,0,
/* 10237 */ 0,0,0,56,88,104,112,0,
/* 10238 */ 56,64,128,248,128,64,56,0,
/* 10239 */ 0,0,48,204,204,204,204,0,
/* 10240 */ 252,0,0,252,0,0,252,0,
/* 10241 */ 16,16,124,16,16,0,254,0,
/* 10242 */ 32,16,8,16,32,0,254,0,
/* 10243 */ 16,32,64,32,16,0,254,0,
/* 10244 */ 24,52,48,48,48,48,48,48,
/* 10245 */ 48,48,48,48,48,48,176,112,
/* 10246 */ 48,48,0,252,0,48,48,0,
/* 10247 */ 0,100,152,0,100,152,0,0,
/* 10248 */ 56,68,68,56,0,0,0,0,
/* 10249 */ 0,56,56,0,0,0,0,0,
/* 10250 */ 0,0,56,0,0,0,0,0,
/* 10251 */ 14,8,8,72,40,24,8,0,
/* 10252 */ 0,0,0,176,72,72,72,0,
/* 10253 */ 0,0,240,60,64,128,248,0,
/* 10254 */ 252,252,252,252,252,252,252,252,
/* 10255 */ 0,0,0,0,0,0,0,0
};
vdp_clr16k()
{
unsigned int a;
printf("Let's set VDP write address to #0000 \n");
out(CMDP,0); /* 0x00 - a6 a7 a8 a9 a10 a11 a12 a13 - all zeroes */
out(CMDP,64); /* 0x40 - 01 a0 a1 a2 a3 a4 a5 - all zeroes */
printf("Now let's clear first 16Kb of VDP memory\n");
for(a=0;a<16384;a++) {
out(DATAP,0);
}
}
vdp_setregs()
{
printf("Now it's time to set up VDP registers\n");
out(CMDP,0); /* 0x00 - 000000 - 0 M3 M3 of 0 required text mode */
/* 0 EX EX of 0 disables extVDP inp */
out(CMDP,128); /* 0x80 - 1 0000 000 - reg 0 */
}
vdp_modes()
{
printf("Select 40 column mode, ");
printf("enable screen and disable vertical interrupt\n");
out(CMDP,80); /* 0x50 - 0101 0000 - 0 4/16K Select 4027 RAM operation */
/* 1 BLANK Enables the active display */
/* 0 IE Disables VDP interrupt */
/* 1 M1 M1 of 1 is required for text mode */
/* 0 M2 M2 of zero is required for text mode */
/* 0 n/a */
/* 0 SIZE 0 sprites 8x8 */
/* 0 MAG 0 sprites 2X */
out(CMDP,129); /* 0x81 - 1 0000 001 - reg 1 */
}
vdp_pnt()
{
printf("Set pattern name table to #0000\n");
out(CMDP,0); /* 0x00 - 0000 0000 - name table base addr 0 */
out(CMDP,130); /* 0x82 - 1 0000 010 - reg 2 */
}
vdp_pgt()
{
printf("Set pattern generator table to #800\n");
out(CMDP,1); /* 0x01 - 00000 001 - pattern generator base addr 1 */
out(CMDP,132); /* 0x84 - 1 0000 100 - reg 4 */
}
vdp_colors()
{
printf("Set colors to white on black\n");
out(CMDP,240); /* 0xF0 - 1111 0000 - (text=1111 bkgd=0000 */
out(CMDP,135); /* 0x87 - 1 0000 111 - reg 7 */
}
vdp_load_set()
{
int c,d,index;
printf("Let's set VDP write address to #800 so ");
printf("that we can write character set to memory\n");
out(CMDP,0); /* 0x00 - a6 a7 a8 a9 a10 a11 a12 a13 - all zeroes */
out(CMDP,72); /* 0x48 - 01 a0=0 a1=0 a2=1 a3=0 a4=0 a5=0 */
/* a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 */
/* 0 0 0 1 0 0 0 0 0 0 0 0 0 0 */
/* 000 1000 0000 0000 */
printf("Create a character set\n");
index=0;
for(c=0;c<256;c++) {
for(d=0;d<8;d++) {
out(DATAP,data[index++]);
}
}
}
vdp_fill()
{
int c,d;
printf("Let's set write address to start of name table\n");
out(CMDP,0);
out(CMDP,64); /* 0x40 */
printf("Let's put characters to screen\n");
d = 0;
for(c=0;c<(40*24);c++) {
out(DATAP,d);
d++;
if(128 == d) d=0;
}
}
vdp_sync_regen()
{
int c,d;
printf("Let's set write address to start of name table\n");
out(CMDP,0);
out(CMDP,64); /* 0x40 */
printf("Let's put characters to screen\n");
d = 0;
for(c=0;c<(40*24);c++) {
out(DATAP,regen[c]);
}
}
func700()
{
out(CMDP,0);
out(CMDP,0);
}
vdp_clr_regen()
{
unsigned int index;
for(index=0;index<(24*40);index++) {
regen[index] = ' ';
}
}
vdp_set_regen()
{
unsigned int index;
for(index=0;index<40*24;index++) {
regen[index]=index&0x7f;
}
}
vdp_num_regen()
{
unsigned int index;
for(index=0;index<40*24;index++) {
regen[index]=0x30+(index%10);
}
}
vdp_display()
{
int c,v;
for(c=0;c<17;c++) {
v = in(DATAP);
printf("0x2x ",v);
}
}
/* eof - tms9918.h */


BIN
branches/dgg/Apps/core/access.com

Binary file not shown.

BIN
branches/dgg/Apps/core/cpmname.com

Binary file not shown.

BIN
branches/dgg/Apps/core/findfile.com

Binary file not shown.

BIN
branches/dgg/Apps/core/map.com

Binary file not shown.

BIN
branches/dgg/Apps/core/meta.com

Binary file not shown.

BIN
branches/dgg/Apps/core/multifmt.com

Binary file not shown.

BIN
branches/dgg/Apps/core/noaccess.com

Binary file not shown.

BIN
branches/dgg/Apps/core/rem.com

Binary file not shown.

BIN
branches/dgg/Apps/core/setlabel.com

Binary file not shown.

BIN
branches/dgg/Apps/core/sysgen.com

Binary file not shown.

BIN
branches/dgg/Apps/core/termtype.com

Binary file not shown.

BIN
branches/dgg/Apps/core/view.com

Binary file not shown.

20
branches/dgg/Apps/crossdev/APPLVERS.H

@ -0,0 +1,20 @@
/****************************/
/* applvers.h dwg - 2.0.0.0 */
/****************************/
#define A_RMJ 2
#define A_RMN 0
#define A_RUP 0
#define A_RTP 0
#define A_MONTH 6
#define A_DAY 10
#define A_YEAR 2012
#define A_YR 12
/********************/
/* eof - applvers.h */
/********************/


67
branches/dgg/Apps/crossdev/ASMIFACE.ASM

@ -0,0 +1,67 @@
; asmiface.asm 6/4/2012 dwg -
extrn .begin,.chl,.swt
extrn csave,cret,.move
global xrega_,1
global xregbc_,2
global xregde_,2
global xreghl_,2
PUBLIC asmif_
asmif_: lxi d,.2
call csave
LXI H,8-.2 ; pick up 1st parm "function address"
DAD SP
MOV E,M
INX H
MOV D,M
xchg
shld callad+1
LXI H,10-.2
DAD SP
MOV E,M
INX H
MOV D,M ; DE = parm
xchg
shld xregbc_
LXI H,12-.2
DAD SP
MOV E,M
INX H
MOV D,M
xchg
shld xregde_
LXI H,14-.2
DAD SP
MOV E,M
INX H
MOV D,M
xchg
shld xreghl_
lhld xregbc_
mov b,h
mov c,l ; setup B&C
lhld xregde_
xchg ; setup D&E
lhld xreghl_ ; setup H&L
callad: call 0e639h ; setlu
sta xrega_
shld xreghl_
xchg
shld xregde_
mov l,c
mov h,b
shld xregbc_
RET ; HL has return value
.2 EQU 0
END


14
branches/dgg/Apps/crossdev/ASMIFACE.H

@ -0,0 +1,14 @@
/*****************************/
/* asmiface.H 6/4/2012 dwg - */
/*****************************/
extern char xrega;
extern unsigned int xregbc;
extern unsigned int xregde;
extern unsigned int xreghl;
extern asmif(); /* asmif(0xe60,bc,de,hl); */
/********************/
/* eof - asmiface.h */
/********************/


4
branches/dgg/Apps/crossdev/BANNER.H

@ -0,0 +1,4 @@
/* banner.h */
extern sbanner();
extern banner();


71
branches/dgg/Apps/crossdev/BDOSCALL.ASM

@ -0,0 +1,71 @@
; bdoscall.asm 3/10/2012 dwg - bdos binding for Aztec C
global drega_,1
global dregbc_,2
global dregde_,2
global dreghl_,2
PUBLIC lurst_
lurst_:
push b
push d
push h
push psw
mvi c,37
lxi d,127
lxi b,127
call 5
pop psw
pop h
pop d
pop b
RET
PUBLIC bdoscall_
bdoscall_:
push b
push d
push h
push psw
lhld dregbc_
mov b,h
mov c,l
lhld dregde_
mov d,h
mov e,l
lhld dreghl_
lda drega_
call 5
sta drega_
shld dreghl_
mov l,e
mov h,d
shld dregde_
mov l,c
mov h,b
shld dregbc_
pop psw
pop h
pop d
pop b
RET
END


8
branches/dgg/Apps/crossdev/BDOSCALL.H

@ -0,0 +1,8 @@
/* bdoscall.h 3/10/2012 dwg - header file for bdoscall */
extern char drega;
extern unsigned int dregbc;
extern unsigned int dregde;
extern unsigned int dreghl;
extern bdoscall();


BIN
branches/dgg/Apps/crossdev/BIN/AS80.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/BIN/CCZ.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/BIN/HEX80.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/BIN/LIBUTIL.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/BIN/LN80.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/BIN/MAKE.EXE

Binary file not shown.

80
branches/dgg/Apps/crossdev/BIOSCALL.ASM

@ -0,0 +1,80 @@
; bioscall.asm 3/10/2012 dwg - bios binding for Aztec C
global irega_,1
global iregbc_,2
global iregde_,2
global ireghl_,2
public getmeta_
getmeta_:
push psw
push b
push d
push h
lxi b,4
lxi d,0
call 0e61bh
lxi d,0
call 0e61eh
lxi d,11
call 0e621h
lxi d,80h
call 0e624h
call 0e627h
pop h
pop d
pop b
pop psw
ret
PUBLIC bioscall_
bioscall_:
push b
push d
push h
push psw
lhld iregbc_
mov b,h
mov c,l
lhld iregde_
mov d,h
mov e,l
lhld ireghl_
shld mycall+1
lda irega_
mycall: call 5
sta irega_
shld ireghl_
mov l,e
mov h,d
shld iregde_
mov l,c
mov h,b
shld iregbc_
pop psw
pop h
pop d
pop b
RET
END


8
branches/dgg/Apps/crossdev/BIOSCALL.H

@ -0,0 +1,8 @@
/* bioscall.h 3/10/2012 dwg - header file for bdoscall */
extern char irega;
extern unsigned int iregbc;
extern unsigned int iregde;
extern unsigned int ireghl;
extern bioscall();


BIN
branches/dgg/Apps/crossdev/C.LIB

Binary file not shown.

41
branches/dgg/Apps/crossdev/CBANNER.C

@ -0,0 +1,41 @@
/* cbanner.c 3/12/2012 dwg - */
#include "portab.h"
#include "globals.h"
#include "applvers.h"
char * lines = "----------------------------------------";
char * line1 = "12345678.123 mm/dd/yyyy Version x.x.x.x";
char * line2 = "S/N CPM80-DWG-654321 Licensed under GPL3";
char * line3 = "Copyright (C) 2011-12 Douglas W. Goodall";
sbanner(program)
char *program;
{
char szTemp[128];
printf("%s ",program);
printf("%2d/%2d/%4d ",A_MONTH,A_DAY,A_YEAR);
printf("Version %d.%d.%d.%d ",A_RMJ,A_RMN,A_RUP,A_RTP);
printf("COPR Douglas Goodall Licensed w/GPLv3\n");
}
banner(program)
char *program;
{
char szTemp[128];
printf("%s\n",lines);
strcpy(szTemp,program);
while(12 > strlen(szTemp)) {
strcat(szTemp," ");
}
printf("%s ",szTemp);
printf("%2d/%2d/%4d ",A_MONTH,A_DAY,A_YEAR);
printf("Version %d.%d.%d.%d\n",A_RMJ,A_RMN,A_RUP,A_RTP);
printf("%s\n",line2);
printf("%s\n",line3);
printf("%s\n",lines);
}


1
branches/dgg/Apps/crossdev/CBANNER.H

@ -0,0 +1 @@

133
branches/dgg/Apps/crossdev/CHARS.C

@ -0,0 +1,133 @@
/* chars.c 6/7/2012 dwg - test command line arguments */
#include "stdio.h"
#include "portab.h"
#include "globals.h"
#include "std.h"
#include "cpm80.h"
#include "cpmappl.h"
#include "applvers.h"
#define TOP 0
#define LEFT 4
char map[256] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0 */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 1 */
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 0 - 9 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 A - O */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 P - Z */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 a - o */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 7 p - z */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B 0 - 9 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C A - O */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D P - Z */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E a - o */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F p - z */
};
char attroff[] = { 27, '[', 'm', 0 };
char attrbold[] = { 27, '[', '1', 'm', 0 };
char attrlow[] = { 27, '[', '2', 'm', 0 };
char attrundr[] = { 27, '[', '4', 'm', 0 };
char attrblnk[] = { 27, '[', '5', 'm', 0 };
char attrrevs[] = { 27, '[', '7', 'm', 0 };
char attrinvs[] = { 27, '[', '8', 'm', 0 };
char graphon[] = { 27, 'F', 0 };
char graphoff[] = { 27, 'G', 0 };
char atreset[] = "0";
char atbold[] = "1";
char atdim[] = "2";
char atundrscr[] = "4";
char atblink[] = "5";
char atrevs[] = "7";
char athidden[] = "8";
char fgblack[] = "30";
char fgred[] = "31";
char fggreen[] = "32";
char fgyellow[] = "33";
char fgblue[] = "34";
char fgmagenta[] = "35";
char fgcyan[] = "36";
char fgwhite[] = "37";
char bgblack[] = "40";
char bgred[] = "41";
char bggreen[] = "42";
char bgyellow[] = "43";
char bgblue[] = "44";
char bgmagenta[] = "45";
char bgcyan[] = "46";
char bgwhite[] = "47";
dispattr(attr,fg,bg)
char * attr;
char * fg;
char * bg;
{
printf("%c[%s;%s;%sm",27,attr,fg,bg);
}
int main(argc,argv)
int argc;
char *argv[];
{
int i,j,k;
int x,y;
if(1 < argc) {
for(i=1;i<argc;i++) {
printf("%c",atoi(argv[i]));
}
} else {
crtinit();
crtclr();
crtlc(0,0);
dispattr(atbold,fggreen,bgblack);
banner("CHARS");
printf("%s",attroff);
dispattr(atbold,fgcyan,bgblack);
for(x=0;x<16;x++) {
crtlc(TOP+6,LEFT+(x*4)+5);
printf("[%x]",x);
}
printf("%s",attroff);
for(y=0;y<16;y++) {
crtlc(TOP+y+7,LEFT+0);
dispattr(atbold,fgcyan,bgblack);
printf("[%x]",y);
printf("%s",attroff);
for(x=0;x<16;x++) {
crtlc(TOP+y+7,LEFT+(x*4)+6);
if(1 == map[(y*16)+x]) {
printf(".");
} else {
printf("%c",(y*16)+x);
}
}
dispattr(atbold,fgcyan,bgblack);
printf(" [%x]",y);
printf("%s",attroff);
}
}
return 0;
}


57
branches/dgg/Apps/crossdev/CLOGICAL.C

@ -0,0 +1,57 @@
/* clogical.c 6/4/2012 dwg - */
#include "portab.h"
#include "cpmbios.h"
#include "asmiface.h"
lugcur(drive)
{
asmif(pGETLU,drive,0,0);
return xregde;
}
lugnum(drive)
{
asmif(pGETLU,drive,0,0);
return xreghl;
}
lugdu(drive)
{
asmif(pGETLU,drive,0,0);
return xregbc>>8;
}
luscur(drive,lunum)
{
asmif(pGETLU,drive,0,0);
/* A = Result 0=OK */
/* B = devunit */
/* DE = current */
/* HL = numlu */
/* BC = devunit*256+drive */
/* DE = current */
/* HL = numlu */
asmif(pSETLU,xregbc,lunum,xreghl);
}
lusnum(drive,numlu)
{
asmif(pGETLU,drive,0,0);
/* A = Result 0=OK */
/* B = devunit */
/* DE = current */
/* HL = numlu */
/* BC = devunit*256+drive */
/* DE = current */
/* HL = numlu */
asmif(pSETLU,xregbc,xregde,numlu);
}
/********************/
/* eof - clogical.c */
/********************/


18
branches/dgg/Apps/crossdev/CLOGICAL.H

@ -0,0 +1,18 @@
/*****************************/
/* clogical.H 6/4/2012 dwg - */
/*****************************/
#define METATRK 0
#define METASEC 11
extern lugdu();
extern lugcur();
extern luscur();
extern lugnum();
extern lusnum();
/********************/
/* eof - clogical.h */
/********************/


53
branches/dgg/Apps/crossdev/CMEMORY.C

@ -0,0 +1,53 @@
/* cmemory.c 3/13/2012 dwg - */
#include "portab.h"
/* #include "cpmbind.h" */
memcmp(xptr,yptr,count)
u8 * xptr;
u8 * yptr;
int count;
{
u8 * x;
u8 * y;
int i;
x = xptr;
y = yptr;
for(i=0;i<count;i++) {
if(*x++ != *y++) return FALSE;
}
return TRUE;
}
memcpy(dstptr,srcptr,count)
u8 * dstptr;
u8 * srcptr;
int count;
{
u8 * s;
u8 * d;
int i;
s = srcptr;
d = dstptr;
for(i=0;i<count;i++) {
*d++ = *s++;
}
}
memset(dstptr,data,count)
u8 * dstptr;
u8 data;
u16 count;
{
u8 * p;
int i;
p = dstptr;
for(i=0;i<count;i++) {
*p++ = data;
}
}


108
branches/dgg/Apps/crossdev/CNAMEPT1.C

@ -0,0 +1,108 @@
/* cnamept1.c 5/24/2012 dwg - added bootlu */
#include "stdio.h"
#include "stdlib.h"
#include "portab.h"
#include "std.h"
#include "cnfgdata.h"
#include "syscfg.h"
extern pager();
char cache[17];
cnamept1(syscfg)
struct SYSCFG * syscfg;
{
strcpy(cache,"syscfg->cnfgdata");
printf("syscfg->jmp jp 0%04xh",syscfg->jmp.address);
pager();
printf("syscfg->cnfloc .dw 0%04xh",syscfg->cnfloc);
pager();
printf("syscfg->tstloc .dw 0%04xh",syscfg->tstloc);
pager();
printf("syscfg->varloc .dw 0%04xh",syscfg->varloc);
pager();
printf("%s.rmj = %d",cache,syscfg->cnfgdata.rmj);
pager();
printf("%s.rmn = %d",cache,syscfg->cnfgdata.rmn);
pager();
printf("%s.rup = %d",cache,syscfg->cnfgdata.rup);
pager();
printf("%s.rtp = %d",cache,syscfg->cnfgdata.rtp);
pager();
printf("%s.diskboot = ",cache);
switch(syscfg->cnfgdata.diskboot) {
case TRUE: printf("TRUE"); break;
case FALSE: printf("FALSE"); break;
}
pager();
printf("%s.devunit = 0x%02x",cache,
syscfg->cnfgdata.devunit);
pager();
printf("%s.bootlu = 0x%04x",cache,
syscfg->cnfgdata.bootlu);
pager();
printf("%s.freq = %dMHz",cache,syscfg->cnfgdata.freq);
pager();
printf("%s.platform = ",cache);
switch(syscfg->cnfgdata.platform) {
case PLT_N8VEM: printf("N8VEM"); break;
case PLT_ZETA: printf("ZETA"); break;
case PLT_N8: printf("N8"); break;
}
pager();
printf("%s.dioplat = ",cache);
switch(syscfg->cnfgdata.dioplat) {
case DPNONE: printf("DIOPLT_NONE"); break;
case DPDIO: printf("DIOPLT_DISKIO"); break;
case DPZETA: printf("DIOPLT_ZETA"); break;
case DPDIDE: printf("DIOPLT_DIDE"); break;
case DPN8: printf("DIOPLT_N8"); break;
case DPDIO3: printf("DIOPLT_DISKIO3"); break;
default: printf("Unknown"); break;
}
pager();
printf("%s.vdumode = ",cache);
switch(syscfg->cnfgdata.vdumode) {
case VPNONE: printf("VDUPLT_NONE"); break;
case VPVDU: printf("VDUPLT_VDU"); break;
case VPVDUC: printf("VDUPLT_VDUC"); break;
case VPPROPIO: printf("VDUPLT_PROPIO"); break;
case VPN8: printf("VDUPLT_VPN8"); break;
default: printf("Unknown!!"); break;
}
pager();
printf("%s.romsize = %d",cache,
syscfg->cnfgdata.romsize);
pager();
printf("%s.ramsize = %d",cache,
syscfg->cnfgdata.ramsize);
pager();
}
/********************/
/* eof - cnamecp1.c */
/********************/


113
branches/dgg/Apps/crossdev/CNAMEPT2.C

@ -0,0 +1,113 @@
/* cnamept2.c 5/24/2012 dwg - */
#include "stdio.h"
#include "stdlib.h"
#include "portab.h"
#include "std.h"
#include "cnfgdata.h"
#include "syscfg.h"
extern pager();
char cache[17];
cnamept2(syscfg)
struct SYSCFG * syscfg;
{
strcpy(cache,"syscfg->cnfgdata");
printf("%s.clrramdk = ",cache);
switch(syscfg->cnfgdata.clrramdk) {
case CLRNEV: printf("CLR_NEVER"); break;
case CLRAUTO: printf("CLR_AUTO"); break;
case CLRALLW: printf("CLR_ALLWAYS"); break;
}
pager();
printf("%s.dskyenable = ",cache);
switch(syscfg->cnfgdata.dskyenable) {
case TRUE: printf("TRUE"); break;
case FALSE: printf("FALSE"); break;
}
pager();
printf("%s.uartenable = ",cache);
switch(syscfg->cnfgdata.uartenable) {
case TRUE: printf("TRUE"); break;
case FALSE: printf("FALSE"); break;
}
pager();
printf("%s.vduenable = ",cache);
switch(syscfg->cnfgdata.vduenable) {
case TRUE: printf("TRUE"); break;
case FALSE: printf("FALSE"); break;
}
pager();
printf("%s.fdenable = ",cache);
switch(syscfg->cnfgdata.fdenable) {
case TRUE: printf("TRUE"); break;
case FALSE: printf("FALSE"); break;
}
pager();
if(TRUE == syscfg->cnfgdata.fdenable) {
printf("%s.fdtrace = ",cache);
switch(syscfg->cnfgdata.fdtrace) {
case 0: printf("Silent"); break;
case 1: printf("Fatal Errors"); break;
case 2: printf("All Errors"); break;
case 3: printf("Everything"); break;
default: printf("Unknown!!"); break;
}
pager();
printf("%s.fdmedia = ",cache);
switch(syscfg->cnfgdata.fdmedia) {
case FDM720: printf("FDM720");
printf(" 3.5 720KB 2-sided 80 Trks 9 Sectors");
break;
case FDM144: printf("FDM144");
printf(" 3.5 1.44MB 2-sided 80 Trks 18 Sectors");
break;
case FDM360: printf("FDM360");
printf(" 5.25 360KB 2-sided 40 Trks 9 Sectors");
break;
case FDM120: printf("FDM120");
printf(" 3.5 1.2MB 2-sided 80 Trks 15 Sectors");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.fdmediaalt = ",cache);
switch(syscfg->cnfgdata.fdmediaalt) {
case FDM720: printf("FDM720");
printf(" 3.5 720KB 2-sided 80 Trks 9 Sectors");
break;
case FDM144: printf("FDM144");
printf(" 3.5 1.44MB 2-sided 80 Trks 18 Sectors");
break;
case FDM360: printf("FDM360");
printf(" 5.25 360KB 2-sided 40 Trks 9 Sectors");
break;
case FDM120: printf("FDM120");
printf(" 3.5 1.2MB 2-sided 80 Trks 15 Sectors");
break;
}
pager();
}
}
/********************/
/* eof - cnamept2.c */
/********************/


216
branches/dgg/Apps/crossdev/CNAMEPT3.C

@ -0,0 +1,216 @@
/* cnamept2.c 5/24/2012 dwg - */
#include "stdio.h"
#include "stdlib.h"
#include "portab.h"
#include "std.h"
#include "cnfgdata.h"
#include "syscfg.h"
extern pager();
char cache[17];
cnamept3(syscfg)
struct SYSCFG * syscfg;
{
strcpy(cache,"syscfg->cnfgdata");
printf("%s.fdmauto = ",cache);
switch(syscfg->cnfgdata.fdmauto) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
}
pager();
printf("%s.ideenable = ",cache);
switch(syscfg->cnfgdata.ideenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
}
pager();
if(TRUE == syscfg->cnfgdata.ideenable) {
printf("%s.idetrace = ",cache);
switch(syscfg->cnfgdata.idetrace) {
case 0: printf("SILENT");
break;
case 1: printf("ERRORS");
break;
case 2: printf("EVERYTHING");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.de8bit = ",cache);
switch(syscfg->cnfgdata.ide8bit) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.idecapacity = %dMB",cache,
syscfg->cnfgdata.idecapacity);
pager();
}
printf("%s.ppideenable = ",cache);
switch(syscfg->cnfgdata.ppideenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
}
pager();
if(TRUE == syscfg->cnfgdata.ppideenable) {
printf("%s.ppidetrace = ",cache);
switch(syscfg->cnfgdata.ppidetrace) {
case 0: printf("SILENT");
break;
case 1: printf("ERRORS");
break;
case 2: printf("EVERYTHING");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.ppide8bit = ",cache);
switch(syscfg->cnfgdata.ppide8bit) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.ppidecapacity = %dKB",cache,
syscfg->cnfgdata.ppidecapacity);
pager();
printf("%s.ppideslow = ",cache);
switch(syscfg->cnfgdata.ppideslow) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
}
printf("%s.boottype = ",cache);
switch(syscfg->cnfgdata.boottype) {
case BTMENU: printf("BT_MENU");
break;
case BTAUTO: printf("BT_AUTO");
break;
}
pager();
printf("%s.boottimeout = %d seconds",cache,
syscfg->cnfgdata.boottimeout);
pager();
printf("%s.bootdefault = %c:",cache,
syscfg->cnfgdata.bootdefault);
pager();
printf("%s.baudrate = %u (0x%04x) Baud",cache,
syscfg->cnfgdata.baudrate,syscfg->cnfgdata.baudrate);
pager();
if(PLT_N8 == syscfg->cnfgdata.platform) {
printf("%s.ckdiv = %d",cache,
syscfg->cnfgdata.ckdiv);
pager();
printf("%s.memwait = 0x%02x",cache,
syscfg->cnfgdata.memwait);
pager();
printf("%s.iowait = 0x%02x",cache,syscfg->cnfgdata.iowait);
pager();
printf("%s.cntlb0 = 0x%02x",cache,syscfg->cnfgdata.cntlb0);
pager();
printf("%s.cntlb1 = 0x%02x",cache,syscfg->cnfgdata.cntlb1);
pager();
printf("%s.sdenable = ",cache);
switch(syscfg->cnfgdata.sdenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.sdtrace = ",cache);
switch(syscfg->cnfgdata.sdtrace) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
}
}
/********************/
/* eof - cnamept3.c */
/********************/
/*
unsigned char ckdiv;
unsigned char memwait;
unsigned char iowait;
unsigned char cntlb0;
unsigned char cntlb1;
unsigned char sdenable;
unsigned char sdtrace;
unsigned int sdcapacity;
unsigned char sdcsio;
unsigned char sdcsiofast;
unsigned char defiobyte;
unsigned char termtype;
unsigned int revision;
unsigned char prpsdenable;
unsigned char prpsdtrace;
unsigned int prpsdcapacity;
unsigned char prpconenable;
unsigned int biossize;
*/


198
branches/dgg/Apps/crossdev/CNAMEPT4.C

@ -0,0 +1,198 @@
/* cnamept2.c 5/24/2012 dwg - */
#include "stdio.h"
#include "stdlib.h"
#include "portab.h"
#include "std.h"
#include "cnfgdata.h"
#include "syscfg.h"
extern pager();
char cache[17];
cnamept4(syscfg)
struct SYSCFG * syscfg;
{
strcpy(cache,"syscfg->cnfgdata");
if(PLT_N8 == syscfg->cnfgdata.platform) {
printf("%s.sdcapacity = %uKB",cache,
syscfg->cnfgdata.sdcapacity);
pager();
printf("%s.sdcsio = ",cache);
switch(syscfg->cnfgdata.sdcsio) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default:
printf("Unknown!!");
break;
}
pager();
printf("%s.sdcsiofast = ",cache);
switch(syscfg->cnfgdata.sdcsiofast) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
}
printf("%s.defiobyte = 0x%02x",cache,
syscfg->cnfgdata.defiobyte);
pager();
printf("%s.termtype = ",cache);
switch(syscfg->cnfgdata.termtype) {
case TERM_TTY: printf("TERM_TTY");
break;
case TERM_ANSI: printf("TERM_ANSI");
break;
case TERM_WYSE: printf("TERM_WYSE");
break;
case TERM_VT52: printf("TERM_VT52");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.revision = %d",cache,
syscfg->cnfgdata.revision);
pager();
printf("%s.prpenable = ",cache);
switch(syscfg->cnfgdata.prpenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
if(TRUE == syscfg->cnfgdata.prpenable) {
printf("%s.prpsdenable = ");
switch(syscfg->cnfgdata.prpsdenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
if(TRUE == syscfg->cnfgdata.prpsdenable) {
printf("%s.prpsdtrace = ",cache);
switch(syscfg->cnfgdata.prpsdtrace) {
case 0: printf("SILENT");
break;
case 1: printf("ERRORS");
break;
case 2: printf("EVERYTHING");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.prpsdcapacity = ",cache);
pager();
printf("%s.prpconenable = ",cache);
switch(syscfg->cnfgdata.prpconenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
}
}
printf("%s.biossize = %d",cache,
syscfg->cnfgdata.biossize);
pager();
printf("%s.pppenable = ",cache);
switch(syscfg->cnfgdata.pppenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
if(TRUE == syscfg->cnfgdata.pppenable) {
printf("%s.pppsdenable = ",cache);
switch(syscfg->cnfgdata.pppsdenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.pppsdtrace = ",cache);
switch(syscfg->cnfgdata.pppsdtrace) {
case 0: printf("SILENT");
break;
case 1: printf("ERRORS");
break;
case 2: printf("EVERYTHING");
break;
default: printf("Unknown!!");
break;
}
pager();
printf("%s.pppcapacity = %d",cache,
syscfg->cnfgdata.prpsdcapacity);
pager();
printf("%s.pppconenable = ",cache);
switch(syscfg->cnfgdata.pppconenable) {
case TRUE: printf("TRUE");
break;
case FALSE: printf("FALSE");
break;
default: printf("Unknown!!");
break;
}
pager();
}
}
/********************/
/* eof - cnamept4.c */
/********************/


73
branches/dgg/Apps/crossdev/CNFGDATA.H

@ -0,0 +1,73 @@
/* cnfgdata.h 6/04/2012 dwg - */
struct CNFGDATA {
unsigned char rmj;
unsigned char rmn;
unsigned char rup;
unsigned char rtp;
unsigned char diskboot;
unsigned char devunit;
unsigned int bootlu;
unsigned char hour;
unsigned char minute;
unsigned char second;
unsigned char month;
unsigned char day;
unsigned char year;
unsigned char freq;
unsigned char platform;
unsigned char dioplat;
unsigned char vdumode;
unsigned int romsize;
unsigned int ramsize;
unsigned char clrramdk;
unsigned char dskyenable;
unsigned char uartenable;
unsigned char vduenable;
unsigned char fdenable;
unsigned char fdtrace;
unsigned char fdmedia;
unsigned char fdmediaalt;
unsigned char fdmauto;
unsigned char ideenable;
unsigned char idetrace;
unsigned char ide8bit;
unsigned int idecapacity;
unsigned char ppideenable;
unsigned char ppidetrace;
unsigned char ppide8bit;
unsigned int ppidecapacity;
unsigned char ppideslow;
unsigned char boottype;
unsigned char boottimeout;
unsigned char bootdefault;
unsigned int baudrate;
unsigned char ckdiv;
unsigned char memwait;
unsigned char iowait;
unsigned char cntlb0;
unsigned char cntlb1;
unsigned char sdenable;
unsigned char sdtrace;
unsigned int sdcapacity;
unsigned char sdcsio;
unsigned char sdcsiofast;
unsigned char defiobyte;
unsigned char termtype;
unsigned int revision;
unsigned char prpsdenable;
unsigned char prpsdtrace;
unsigned int prpsdcapacity;
unsigned char prpconenable;
unsigned int biossize;
unsigned char pppenable;
unsigned char pppsdenable;
unsigned char pppsdtrace;
unsigned int pppsdcapacity;
unsigned char pppconenable;
unsigned char prpenable;
};
/********************/
/* eof - cnfgdata.h */
/********************/

196
branches/dgg/Apps/crossdev/CPM80.H

@ -0,0 +1,196 @@
/* cpmbios.h 3/11/2012 dwg - added CURDRV */
/*************************/
/* BIOS Memory Locations */
/*************************/
#define CURDRV 0x00004
#define BIOSAD 0x0e600
#define pBOOT 0x0E600
#define pWBOOT 0x0E603
#define pCONST 0x0E606
#define pCONIN 0x0E609
#define pCONOUT 0x0E60C
#define pLIST 0x0E60F
#define pPUNCH 0x0E612
#define pREADER 0x0E615
#define pHOME 0x0E618
#define pSELDSK 0x0E61B
#define pSETTRK 0x0E61E
#define pSETSEC 0x0E621
#define pSETDMA 0x0E624
#define pREAD 0x0E627
#define pWRITE 0x0E62A
#define pLISTST 0x0E62D
#define pSECTRN 0x0E630
#define pBNKSEL 0x0E633
#define pGETLU 0x0E636
#define pSETLU 0x0E639
#define pGETINFO 0x0E63C
struct JMP {
unsigned char opcode;
unsigned int address;
};
struct BIOS {
struct JMP boot;
struct JMP wboot;
struct JMP const;
struct JMP conin;
struct JMP conout;
struct JMP list;
struct JMP punch;
struct JMP reader;
struct JMP home;
struct JMP seldsk;
struct JMP settrk;
struct JMP setsec;
struct JMP setdma;
struct JMP read;
struct JMP write;
struct JMP listst;
struct JMP sectrn;
struct JMP bnksel;
struct JMP getlu;
struct JMP setlu;
struct JMP getinfo;
struct JMP rsvd1;
struct JMP rsvd2;
struct JMP rsvd3;
struct JMP rsvd4;
char diskboot;
char bootdrive;
char devunit;
char rmj;
char rmn;
char rup;
char rtp;
};
struct DPH {
unsigned int xlt;
unsigned int rv1;
unsigned int rv2;
unsigned int rv3;
unsigned int dbf;
unsigned int dpb;
unsigned int csv;
unsigned int alv;
unsigned char sigl;
unsigned char sigu;
unsigned int current;
unsigned int number;
};
struct DPB {
unsigned int spt;
unsigned char bsh;
unsigned char blm;
unsigned char exm;
unsigned int dsm;
unsigned int drm;
unsigned char al0;
unsigned char al1;
unsigned int cks;
unsigned int off;
};
/* bioscall.h 3/10/2012 dwg - header file for bdoscall */
extern char irega;
extern unsigned int iregbc;
extern unsigned int iregde;
extern unsigned int ireghl;
extern bioscall();
/* bdoscall.h 3/10/2012 dwg - header file for bdoscall */
extern char drega;
extern unsigned int dregbc;
extern unsigned int dregde;
extern unsigned int dreghl;
extern bdoscall();
/* diagnose.h 5/23/2012 dwg - */
extern char hrega;
extern unsigned int hregbc;
extern unsigned int hregde;
extern unsigned int hreghl;
extern diagnose();
/* ctermcap.h 3/11/2012 dwg - declarations for termal capability */
extern crtinit();
extern crtclr();
extern crtlc();
/* cpmbdos.h */
#define TERMCPM 0
#define CONIN 1
#define CWRITE 2
#define DIRCONIO 6
#define PRINTSTR 9
#define RDCONBUF 10
#define GETCONST 11
#define RETVERNUM 12
#define RESDISKSYS 13
#define SELECTDISK 14
#define FOPEN 15
#define FCLOSE 16
#define SEARCHFIRST 17
#define SEARCHNEXT 18
#define FDELETE 19
#define FREADSEQ 20
#define FWRITESEQ 21
#define FMAKEFILE 22
#define FRENAME 23
#define RETLOGINVEC 24
#define RETCURRDISK 25
#define SETDMAADDR 26
#define GETALLOCVEC 27
#define WRPROTDISK 28
#define GETROVECTOR 29
#define FSETATTRIB 30
#define GETDPBADDR 31
#define SETGETUSER 32
#define FREADRANDOM 33
#define FWRITERAND 34
#define FCOMPSIZE 35
#define SETRANDREC 36
#define RESETDRIVE 37
#define WRRANDFILL 38
#define DRIVEA 0
/* dphmap.h 5/29/2012 dwg - declaration of DPH MAP structure */
struct DPHMAP {
struct DPH * drivea;
struct DPH * driveb;
struct DPH * drivec;
struct DPH * drived;
struct DPH * drivee;
struct DPH * drivef;
struct DPH * driveg;
struct DPH * driveh;
} * pDPHMAP;
struct DPHMAP * pDPHVEC[MAXDRIVE];
/******************/
/* eof - dphmap.h */
/******************/
/*****************/
/* eof - cpm80.h */
/*****************/


BIN
branches/dgg/Apps/crossdev/CPM86/AME86.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/AME86DOS.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/ARCV.COM

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/AS.EXE

Binary file not shown.

8
branches/dgg/Apps/crossdev/CPM86/ASSERT.H

@ -0,0 +1,8 @@
#ifndef NDEBUG
#ifndef stderr
#include <stdio.h>
#endif
#define assert(x) if (!(x)) {fprintf(stderr,"Assertion failed: x, file %s, line %d\n",__FILE__,__LINE__); exit(1);}
#else
#define assert(x)
#endif

BIN
branches/dgg/Apps/crossdev/CPM86/C.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/CC.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/CCB.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/CNM.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/CPM.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/CRC.EXE

Binary file not shown.

20
branches/dgg/Apps/crossdev/CPM86/CTYPE.H

@ -0,0 +1,20 @@
/* Copyright (C) 1984 by Manx Software Systems */
extern char ctp_[];
#define isalpha(x) (ctp_[(x)+1]&0x03)
#define isupper(x) (ctp_[(x)+1]&0x01)
#define islower(x) (ctp_[(x)+1]&0x02)
#define isdigit(x) (ctp_[(x)+1]&0x04)
#define isxdigit(x) (ctp_[(x)+1]&0x08)
#define isalnum(x) (ctp_[(x)+1]&0x07)
#define isspace(x) (ctp_[(x)+1]&0x10)
#define ispunct(x) (ctp_[(x)+1]&0x40)
#define iscntrl(x) (ctp_[(x)+1]&0x20)
#define isprint(x) (ctp_[(x)+1]&0xc7)
#define isgraph(x) (ctp_[(x)+1]&0x47)
#define isascii(x) (((x)&0x80)==0)
#define toascii(x) ((x)&127)
#define _tolower(x) ((x)|0x20)
#define _toupper(x) ((x)&0x5f)

BIN
branches/dgg/Apps/crossdev/CPM86/D11.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/D20.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/DIFF.EXE

Binary file not shown.

26
branches/dgg/Apps/crossdev/CPM86/DIOCTL.H

@ -0,0 +1,26 @@
/* Copyright (C) 1983 by Manx Software Systems */
#define TIOCGETP 0 /* read contents of tty control structure */
#define TIOCSETP 1 /* set contents of tty control structure */
#define TIOCSETN 1 /* ditto only don't wait for output to flush */
/* special codes for MSDOS 2.x only */
#define TIOCREAD 2 /* read control info from device */
#define TIOCWRITE 3 /* write control info to device */
#define TIOCDREAD 4 /* same as 2 but for drives */
#define TIOCDWRITE 5 /* same as 3 but for drives */
#define GETISTATUS 6 /* get input status */
#define GETOSTATUS 7 /* get output status */
struct sgttyb {
short sg_flags; /* control flags */
char sg_erase; /* ignored */
char sg_kill; /* ignored */
};
/* settings for flags */
#define RAW 0x20 /* no echo or mapping of input/output BDOS(6) */
/* Refer to the MSDOS technical reference for detailed information on
* the remaining flags.
*/

29
branches/dgg/Apps/crossdev/CPM86/ERRNO.H

@ -0,0 +1,29 @@
extern int errno;
extern char *sys_errlist[];
extern int sys_nerr;
/* MsDos return codes */
#define EINVAL 1
#define ENOENT 2
#define ENOTDIR 3
#define EMFILE 4
#define EACCES 5
#define EBADF 6
#define EARENA 7
#define ENOMEM 8
#define EFAULT 9
#define EINVENV 10
#define EBADFMT 11
#define EINVACC 12
#define EINVDAT 13
#define ENODEV 15
#define ERMCD 16
#define EXDEV 17
#define ENOMORE 18
/* additional codes used by Aztec C */
#define EEXIST 19
#define ENOTTY 20
/* used by the math library */
#define ERANGE 21
#define EDOM 22

7
branches/dgg/Apps/crossdev/CPM86/FCNTL.H

@ -0,0 +1,7 @@
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#define O_CREAT 0x0100
#define O_TRUNC 0x0200
#define O_EXCL 0x0400
#define O_APPEND 0x0800

BIN
branches/dgg/Apps/crossdev/CPM86/G.LIB

Binary file not shown.

16
branches/dgg/Apps/crossdev/CPM86/GRAPH.C

@ -0,0 +1,16 @@
main()
{
char buffer[100];
/* set to 25 row x 80 column monochrome mode 6 (HIRES) */
mode('H');
printf("Please enter your name: ");
gets(buffer);
/* set to 25 row x 40 column 4-color mode 4 (MEDRES) */
mode('M');
printf("Hello %s!\nWelcome to the growing family of\nAZTEC C users...\n",
buffer);
getchar();
/* set to 25 row x 80 column color text mode 3 (LOWRES) */
mode('L');
}

BIN
branches/dgg/Apps/crossdev/CPM86/GRAPH.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/GRAPH.O

Binary file not shown.

4
branches/dgg/Apps/crossdev/CPM86/HELLO.C

@ -0,0 +1,4 @@
main()
{
printf("Hello Woprd!!");
}

BIN
branches/dgg/Apps/crossdev/CPM86/HELLO.CMD

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/HELLO.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/HELLO.O

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/HEX86.EXE

Binary file not shown.

82
branches/dgg/Apps/crossdev/CPM86/IO.H

@ -0,0 +1,82 @@
/* Copyright (C) 1982 by Manx Software Systems */
/*
* if MAXCHAN is changed then the initialization of chantab in croot.c
* should be adjusted so that it initializes EXACTLY MAXCHAN elements of
* the array. If this is not done, the I/O library may exhibit
* strange behavior.
*/
#define MAXCHAN 11 /* maximum number of I/O channels */
/*
* argument to device routines.
* this is a typedef to allow future redeclaration to guarantee
* enough space to store either a pointer or an integer.
*/
typedef char *_arg;
/*
* device control structure
*/
struct device {
char d_read;
char d_write;
char d_ioctl; /* used by character special devices (eg CON:) */
char d_seek; /* used by random I/O devices (eg: a file) */
int (*d_open)(); /* for special open handling */
};
/*
* device table, contains names and pointers to device entries
*/
struct devtabl {
char *d_name;
struct device *d_dev;
_arg d_arg;
};
/*
* channel table: relates fd's to devices
*/
struct channel {
char c_read;
char c_write;
char c_ioctl;
char c_seek;
int (*c_close)();
_arg c_arg;
} ;
extern struct channel chantab[MAXCHAN];
struct fcb {
char f_driv;
char f_name[8];
char f_type[3];
char f_ext;
char f_resv[2];
char f_rc;
char f_sydx[16];
char f_cr;
unsigned f_record; char f_overfl;
};
struct fcbtab {
struct fcb fcb;
char offset;
char flags;
char user;
};
#define OPNFIL 15
#define CLSFIL 16
#define DELFIL 19
#define READSQ 20
#define WRITSQ 21
#define MAKFIL 22
#define SETDMA 26
#define GETUSR 32
#define READRN 33
#define WRITRN 34
#define FILSIZ 35
#define SETREC 36
#define Wrkbuf ((char *)0x80)

41
branches/dgg/Apps/crossdev/CPM86/LIBC.H

@ -0,0 +1,41 @@
/* Copyright (C) 1981, 1982 by Manx Software Systems */
extern int errno;
#define FLT_FAULT 0 /* vector for floating-point faults */
extern int (*Sysvec[])();
#define NULL 0
#define EOF -1
#define BUFSIZ 1024
#define _BUSY 0x01
#define _ALLBUF 0x02
#define _DIRTY 0x04
#define _EOF 0x08
#define _IOERR 0x10
#define _TEMP 0x20 /* temporary file (delete on close) */
typedef struct {
char *_bp; /* current position in buffer */
char *_bend; /* last character in buffer + 1 */
char *_buff; /* address of buffer */
char _flags; /* open mode, etc. */
char _unit; /* token returned by open */
char _bytbuf; /* single byte buffer for unbuffer streams */
int _buflen; /* length of buffer */
char *_tmpname; /* name of file for temporaries */
} FILE;
extern FILE Cbuffs[];
extern char *Stdbufs; /* free list of buffers */
long ftell();
#define stdin (&Cbuffs[0])
#define stdout (&Cbuffs[1])
#define stderr (&Cbuffs[2])
#define getchar() agetc(stdin)
#define putchar(c) aputc(c, stdout)
#define feof(fp) (((fp)->_flags&_EOF)!=0)
#define ferror(fp) (((fp)->_flags&_IOERR)!=0)
#define clearerr(fp) ((fp)->_flags &= ~(_IOERR|_EOF))
#define fileno(fp) ((fp)->_unit)

210
branches/dgg/Apps/crossdev/CPM86/LMACROS.H

@ -0,0 +1,210 @@
nlist
; Copyright (C) 1985 by Manx Software Systems, Inc.
; :ts=8
ifndef MODEL
MODEL equ 0
endif
if MODEL and 1
largecode
FARPROC equ 1
FPTRSIZE equ 4
else
FPTRSIZE equ 2
endif
if MODEL and 2
LONGPTR equ 1
endif
;this macro to be used on returning
;restores bp and registers
pret macro
if havbp
pop bp
endif
ret
endm
internal macro pname
public pname
pname proc
endm
intrdef macro pname
public pname
ifdef FARPROC
pname label far
else
pname label near
endif
endm
procdef macro pname, args
public pname&_
ifdef FARPROC
_arg = 6
pname&_ proc far
else
_arg = 4
pname&_ proc near
endif
ifnb <args>
push bp
mov bp,sp
havbp = 1
decll <args>
else
havbp = 0
endif
endm
entrdef macro pname, args
public pname&_
ifdef FARPROC
_arg = 6
pname&_:
else
_arg = 4
pname&_:
endif
ifnb <args>
if havbp
push bp
mov bp,sp
else
error must declare main proc with args, if entry has args
endif
decll <args>
endif
endm
;this macro equates 'aname' to arg on stack
decl macro aname, type
;;'byte' or anything else
havtyp = 0
ifidn <type>,<byte>
aname equ byte ptr _arg[bp]
_arg = _arg + 2
havtyp = 1
endif
ifidn <type>,<dword>
aname equ dword ptr _arg[bp]
_arg = _arg + 4
havtyp = 1
endif
ifidn <type>,<cdouble>
aname equ qword ptr _arg[bp]
_arg = _arg + 8
havtyp = 1
endif
ifidn <type>, <ptr>
ifdef LONGPTR
aname equ dword ptr _arg[bp]
_arg = _arg + 4
else
aname equ word ptr _arg[bp]
_arg = _arg + 2
endif
havtyp = 1
endif
ifidn <type>, <fptr>
ifdef FARPROC
aname equ dword ptr _arg[bp]
_arg = _arg + 4
else
aname equ word ptr _arg[bp]
_arg = _arg + 2
endif
havtyp = 1
endif
ifidn <type>, <word>
aname equ word ptr _arg[bp]
_arg = _arg + 2
havtyp = 1
endif
ife havtyp
error -- type is unknown.
endif
endm
;this macro loads an arg pointer into DEST, with optional SEGment
ldptr macro dest, argname, seg
ifdef LONGPTR
ifnb <seg> ;;get segment if specified
ifidn <seg>,<es>
les dest,argname
else
ifidn <seg>,<ds>
lds dest,argname
else
mov dest, word ptr argname
mov seg, word ptr argname[2]
endif
endif
else
ifidn <dest>,<si> ;;si gets seg in ds
lds si, argname
else
ifidn <dest>,<di> ;;or, es:di
les di, argname
else
garbage error: no seg for long pointer
endif
endif
endif
else
mov dest, word ptr argname ;;get the pointer
ENDIF
ENDM
decll macro list
IRP i,<list>
decl i
ENDM
ENDM
pend macro pname
pname&_ endp
endm
retptrm macro src,seg
mov ax, word ptr src
ifdef LONGPTR
mov dx, word ptr src+2
endif
endm
retptrr macro src,seg
mov ax,src
ifdef LONGPTR
ifnb <seg>
mov dx, seg
endif
endif
endm
retnull macro
ifdef LONGPTR
sub dx,dx
endif
sub ax,ax
endm
pushds macro
ifdef LONGPTR
push ds
endif
endm
popds macro
ifdef LONGPTR
pop ds
endif
endm
finish macro
codeseg ends
endm
list
codeseg segment byte public 'code'
assume cs:codeseg

BIN
branches/dgg/Apps/crossdev/CPM86/LN.EXE

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/M.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/M87.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/M87S.LIB

Binary file not shown.

BIN
branches/dgg/Apps/crossdev/CPM86/MAKE.EXE

Binary file not shown.

8
branches/dgg/Apps/crossdev/CPM86/MAKEFILE

@ -0,0 +1,8 @@
hello.cmd: hello.c
cc hello
ln -o hello.cmd hello.o -lc
clean:
erase hello.cmd

1
branches/dgg/Apps/crossdev/CPM86/MAP.BAT

@ -0,0 +1 @@
z:mount i /Users/doug/Downloads/azcpm32d

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save