-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgraphics.asm
7516 lines (7160 loc) · 238 KB
/
graphics.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Name msgibm
; File MSGIBM.ASM
include symboldefs.h
; Copyright (C) 1982, 1999, Trustees of Columbia University in the
; City of New York. The MS-DOS Kermit software may not be, in whole
; or in part, licensed or sold for profit as a software product itself,
; nor may it be included in or distributed with commercial products
; or otherwise distributed by commercial concerns to their clients
; or customers without written permission of the Office of Kermit
; Development and Distribution, Columbia University. This copyright
; notice must not be removed, altered, or obscured.
; Tektronix emulator for use with MS Kermit/IBM.
; Edit history:
; 5 Dec 1996 version 3.15
; Last edit 5 Dec 1996
;==============================================================================
; Original version for TI Pro computers by
; 12-Dec-84 Joe Smith, CSM Computing Center, Golden CO 80401
; adapted to IBM PC June 1987 by Brian Holley,
; Faculty of Economics and Politics
; University of Cambridge, England
; Email: [email protected]
; Upgraded and integrated into MS Kermit 2.30 by Joe Doupnik, Utah State Univ.
;
; Description of Tektronix commands
;
; ESC CONTROL-E (ENQ) requests a status report
; ESC FORMFEED erases the screen.
; ESC CONTROL-X turns on bypass mode (ignore incoming characters).
; ESC CONTROL-Z turns on the crosshairs (not on 4006 or 4025)
; ESC 2 exit Tek submode for text mode (ignore if doing full Tek)
; ESC ? is replaced by DEL code, to assist line plots with 7 bit systems.
; ESC [ Pn ; Pn m set screen colors. Pn = 30 + sum of colors for foregnd,
; 40 + sum of colors for background, Pn = 0 sets b/w, Pn = 1 for high
; intensity. Colors are red = 1, green = 2, blue = 4.
; ESC [ ? 3 8 l exits Tek mode and returns to host text terminal type
; (VT102 if none defined yet). This is an extension from DEC VT340's.
; ESC [ ? 256 n invokes a screen size report, for Word Perfect. Report is
; ESC [ ? 256; height; width; num colors n where num colors is 0, 1 or
; 16; report ESC [ ? 24; 80; 0 n for pure text mono systems.
; ESC @ through ESC M sets default fill pattern as below (1=@...).
; ESC Z report terminal type (as VT320)
; ESC [ 2; 2 $ u host request color palette report.
; ESC / xhome;yhome;xwidth;yheight x draw an empty rectangle
; ESC / xhome;yhome;xwidth;yheight;pattern y fill rectangle with pattern
; ESC / xhome;yhome;xwidth;yheight;pattern z fill rect with pattern+border
; where x/yhome is the lower left Tek corner, xwidth and yheight are the
; Tek width and height. All values are decimal numbers.
; Patterns 0:use default, 1:solid, 2:grey, 3:left to right slant, 4:right to
; left slant, 5:horizontal lines, 6:vertical lines, 7:slanted cross-hatch,
; 8:vertical cross-hatch, 9:checkerboard; 10:dotted, 11:horiz herringbone,
; 12:vertical herringbone,13 and above:border without fill. All are tiling
; 8x8 pixel patterns.
; ESC / param a, ... ESC / param c set user definable line drawing pattern
; to 16 bit value of param; plot as lsb first.
; ESC / 2 h or l, ESC / 9 h or l. h is set, l is reset, 2 is destructive
; space and 9 is destructive backspace. Defaults are reset.
; ESC x ESC y ESC z selects one of these user definable patterns above.
; ESC P P1; P2; P3 q string ESC \ a Sixel Graphics command
; P1 and P3 ignored, P2 = 0 or 2 means draw 0 bits in background, 1 means
; skip them.
; string is
; sixel chars (3fh..7eh, lower 6 bits+3fh, displayed lsb at the top)
; ! Pn sixel char where Pn is a repeat count
; " Pan; Pad; Ph; Pv raster attributes (all ignored for now)
; # Pc; Pu; Px; Py; Pz coloring as follows
; Pc is color palette, 0-255 (note, only 0..15 are predefined)
; Pu is color units, 1=HLS, 2=RGB
; For Hue Lightness Saturation:
; Px = Hue angle, 0-360 degrees. The colors are mapped around
; the color wheel in 60 degree segments as Hues:
; 0-29 deg = blue, 30-89 = magenta (blue + red), 90-149 = red,
; 150-209 = yellow (red + green), 210-269 = green,
; 270-329 = cyan (green + blue), 330-359 = blue.
; Py = Lightness, 0-100%, Pz = Saturation, 0-100%
; Lightness Sat = 51-100 Sat = 11-50 Sat = 0-10
; 86-100 bold white bold white bold white
; 71-85 bold hue bold white bold white
; 57-70 bold hue grey (dim white) grey
; 43-56 bold hue dim hue black
; 29-42 dim hue grey grey
; 14-28 dim hue black black
; 0-13 black black black
; Note that Py = Pz = 50 gives the widest spectrum.
; For RGB: Px = red, 0-100%, Py = green, 0-100%, Pz = blue, 0-100%
; If any color exceeds 50% then the bold bit is turned on for
; the ensemble (IBM ega display adapter constraint for RGBi).
;
; Palette registers can be selected by the substring
; # Pc followed by a non-numeric char other than ";"
; and Pc is the palette register, 0-255.
;
; $ (dollar sign ) meaning go to left margin
; - (minus) meaning go to left margin 6 dots down.
; This command yields one or more sets of 6 vertically arranged dots. They
; are placed starting at the top and left side of the current text cell.
; Escape sequences are permitted within string and occur without disruption.
; CONTROL-] (GS) turns on plot mode, the first move will be with beam off.
; CONTROL-^ (RS) turns on incremental plot mode. RS space means move pen up
; RS P means move pen down, following letters: A, E, D, F, B, J, H, I mean
; move right, right and up, up, left and up, left, left and down, down, and
; right and down, respectively. Ex: RS <space> J J J means move three Tek
; positions left and down with the pen up (invisibly).
; CONTROL-UNDERLINE (US) turns off plot mode, as does CR (for all but 4025).
; CONTROL-X switches from TEKTRONIX sub mode to NORMAL alpha mode but is
; ignored if we are emulating a full Tek terminal rather than a sub mode
; of DEC or Heath.
; FF erases screen.
; ESC letter, where letter is accent grave (`) a..e, sets the line drawing
; pattern until reset to solid lines (same as escape accent) by command or
; a terminal reset.
;
; ENQ = Control E
; ESC = Control [ (left square bracket)
; FF = Control L
; FS = Control \ (backslash)
; GS = Control ] (right square bracket)
; RS = Control ^ (caret)
; US = Control _ (underscore)
;
; The plot commands are characters which specify the absolute position to move
; the beam. All moves except the one immediately after the GrpSp character
; (Control-]) are with a visible trace.
;
; For 4010-like devices - The positions are from 0 to 1023 for both X and Y,
; although only 0 to 780 are visible for Y due to screen geometry. The screen
; is 10.23 by 7.80 inches, and coordinates are sent as 1 to 4 characters.
;
; For 4014-like devices - The positions are from 0 to 4096, but each movement
; is a multiple of 4 positions unless the high-resolution LSBXY are sent. This
; makes it compatible with the 4010 in that a full sized plot fills the screen.
;
; HIX,HIY = High-order 5 bits of position
; LOX,LOY = Middle-order 5 bits of position
; LSBXY = Low-order 2 bits of X + low-order 2 bits of Y (4014 mode)
;
; Hi Y Lo Y Hi X LSBXY Characters sent (Lo-X always sent)
; ---- ---- ---- ----- ----------------------------------
; Same Same Same Same Lo-X
; Same Same Same Diff LSB, Lo-Y, Lo-X 4014
; Same Same Diff Same Lo-Y, Hi-X, Lo-X
; Same Same Diff Diff LSB, Lo-Y, Hi-X, Lo-X 4014
; Same Diff Same Same Lo-Y, Lo-X
; Same Diff Same Diff LSB, Lo-Y, Lo-X 4014
; Same Diff Diff Same Lo-Y, Hi-X, Lo-X
; Same Diff Diff Diff LSB, Lo-Y, Hi-X, Lo-X 4014
; Diff Same Same Same Hi-Y, Lo-X
; Diff Same Same Diff Hi-Y, LSB, Lo-Y, Lo-X 4014
; Diff Same Diff Same Hi-Y, Lo-Y, Hi-X, Lo-X
; Diff Same Diff Diff Hi-Y, LSB, Lo-Y, Hi-X, Lo-X 4014
; Diff Diff Same Same Hi-Y, Lo-Y, Lo-X
; Diff Diff Same Diff Hi-Y, LSB, Lo-Y, Lo-X 4014
; Diff Diff Diff Same Hi-y, Lo-Y, Hi-X, Lo-X
; Diff Diff Diff Diff Hi-y, LSB, Lo-Y, Hi-X, Lo-X 4014
; Offset for byte: 20h 60h 60h 20h 40h
;
; Note that LO-Y must be sent if HI-X has changed so that the TEKTRONIX knows
; the HI-X byte (in the range of 20h-3fh) is HI-X and not HI-Y. LO-Y must
; also be sent if LSBXY has changed, so that the 4010 will ignore LSBXY and
; accept LO-Y. The LSBXY byte is 60h + MARGIN*10h + LSBY*4 + LSBX. (MARGIN=0)
;
;
;
; External variable tekflg and calls to tekini, tekemu, tekesc, tekcls:
; Byte TEKFLG is non-zero when the Tek emulator is active; it is set by the
; startup code in tekini and is maintained in mszibm. Internal variable
; inited remembers if we have a graphics screen saved, etc.
; TEKINI must be called when entering the emulator to establish the graphics
; screen mode and to calculate the screen dimensions.
; TEKRINT reinitialize complete emulator.
; TEKESC is called from say mszibm.asm to invoke Tek emulation when the
; external procedures have detected an Escape Control-L sequence. An implicit
; initialization is done if necessary.
; TEKEMU is the normal entry point to pass a received character to the emulator.
; It too will do an implicit initialization, if required.
; TEKCLS clears the graphics screen, but only if the emulator is active.
; The emulator remains active during Connect mode Help, Status, and other
; interrupts which do not change the terminal type.
public tekemu,tekini,tekrint,tekend,tekgraf ; Terminal emulation
public tekdmp, tekinq, tekpal, tekrpal ; used by mszibm file
public chcontrol, tekcursor, tekgcptr ; used by msyibm file
public ttxtchr, dgline, dgbar, teksetcursor, tekremcursor
public cursorst, croshair, dgcrosson, dgcrossoff, dgcrossrpt
public dgsetcrloc, dgarc, dgpoly, savegoff, saveglen, cspb2
public softlist, softptr, mksoftspace, clearsoft
ENQ equ 05h ; ^E ENQ for TEK enquiries
CAN equ 18h ; ^X to return to ANSI mode
ESCZ equ 1Ah ; SUB, ESC-^Z triggers crosshairs
VT equ 0Bh ; ^K go up one line
CR equ 0Dh
;; FS and GS are 386/486 segment registers so we need to rename them.
FlSep equ 1Ch ; ^\ for point plot mode
GrpSp equ 1Dh ; ^] draw line (1st move is invisible)
RS equ 1Eh ; ^^ for incremental line plot mode
US equ 1Fh ; ^_ (underscore) returns to text mode
accent equ 60h ; accent grave
txtmode equ 4 ; text mode for TEKTRONIX status
maxtekx equ 1024 ; horizontal and
maxteky equ 780 ; vertical resolution of TEK 4010
screen equ 10h ; IBM Bios screen call
uparr equ 72 ; DOS scan codes for arrow keys
dnarr equ 80
lftarr equ 75
rgtarr equ 77
homscn equ 71 ; DOS home screen scan code
shuparr equ '8' ; ascii codes for shifted arrows
shdnarr equ '2'
shlftarr equ '4'
shrgtarr equ '6'
mouse equ 33h ; Microsoft mouse interrupt
msread equ 3 ; mouse, read status and position
mswrite equ 4 ; mouse, set position
mshoriz equ 7 ; mouse, set min/max horizontal motion
msvert equ 8 ; mouse, set min/max vertical motion
msgetbf equ 21 ; mouse, get state buffer size
msgetst equ 22 ; mouse, get mouse state to buffer
mssetst equ 23 ; mouse, set mouse state from buffer
msreset equ 33 ; mouse, software reset
; Graph_mode for different systems:
cga equ 6 ; highest resolution mode for CGA
mono equ 7 ; real monochrome display adapter
colorega equ 14 ; Low-res mode, color EGA
monoega equ 15 ; mono ega needs mode 15
ega equ 16 ; Hi-res mode - EGA
olivetti equ 72 ; Olivetti's Hi-res - 50 lines text
toshiba equ 74h ; Toshiba T3100, like Olivetti
vaxmate equ 0D0h ; DEC VAXmate II, like Olivetti
wyse700 equ 0D3h ; Wyse-700 1280 * 400
hercules equ 255 ; pseudo mode for Hercules graphics
; Note: IBM VGA modes 17 & 18, 640 by 480, can be used by setting "ega" above
; to 17 or 18 and modifying ybot to be 479 and ymult to be 48 at label tekin5.
; The code will scale everything appropriately for the new screen size, but
; there will be insufficient memory to retain the entire graphics image.
; Manual override SET TERMINAL GRAPHICS VGA accomplishes these two steps.
;
; Note: WYSE-700 mode 1024 * 780 and 1280 * 800 can be set only by
; manual override SET TERMINAL GRAPHICS WYSET or WYSEA, respectively.
; No automatic sensing for Wyse.
;; tekflg bits in byte
;tek_active equ 1 ; actively in graphics mode
;tek_tek equ 2 ; Tek terminal
;tek_dec equ 4 ; Tek submode of DEC terminals
;tek_sg equ 8 ; special graphics mode
segega equ 0a000h ; segments of display memory, EGA,VGA
segcga equ 0b800h ; CGA, AT&T/Olivetti and relatives
seghga equ 0b000h ; HGA
segmono equ 0b000h ; Monochrome
segwyse equ 0a000h ; wyse-700, both banks start from here
; Wyse equates:
wystoff equ 03ddh ; set bank start offset
wystseg equ 03deh ; set bank start base
wymode equ 03dfh ; register to select mode & bank
wybeven equ 0c8h ; mask for R/W even bank
wybodd equ 0cbh ; mask for R/W odd bank
; Hercules equates:
index equ 03b4h ; 6845 index register
cntrl equ 03b8h ; Display mode control port
hstatus equ 03bah ; status port
scrn_on equ 8 ; bit to turn screen on
grph equ 2 ; graphics mode
text equ 20h ; text mode
config equ 03bfh ; configuration port
genable equ 1+2 ; enable graphics (1) on two pages (2)
rgbbold equ 80 ; nor/bold threshold for RGB intensity
hiy equ 1 ; codes for Tek graphics components
loy equ 2
hix equ 4
lox equ 3
; maxparam and maxinter must agree with the prime equ's in file mszibm.asm
maxparam equ 10 ; number of ESC and DCS Parameters
maxinter equ 10 ; number of ESC and DCS Intermediates
; Pixel basic operation codes
pixor equ 1 ; write as foreground OR current dot
pixbak equ 2 ; write as absolute background color
pixxor equ 4 ; write as foreground XOR current dot
pixfor equ 8 ; write absolute foreground color
data segment
extrn flags:byte, rxtable:byte, vtemu:byte, vtcpage:word
extrn tv_mode:byte, yflags:byte, low_rgt:byte, tekflg:byte
extrn param:word, nparam:word, inter:byte, ninter:word, lparam:byte
extrn parstate:word, pardone:word, parfail:word
extrn dnparam:word, dparam:word, dlparam:byte, dninter:word
extrn dinter:byte, dcsstrf:byte, emubufc:word, emubuf:byte
extrn emubufl:word, ttyact:byte, vtclear:byte
extrn dgwindcomp:byte, atctype:byte, dgcross:byte, scbattr:byte
extrn rdbuf:byte, decbuf:byte, curattr:byte, dosnum:word
extrn parmsk:byte, flowon:byte, flowoff:byte, flowcnt:byte
extrn emsrbhandle:word, emsgshandle:word, dgd470mode:byte
extrn xms:dword, xmsghandle:word, xmsep:word, useexp:byte
; required for Hercules screen handling
gtable db 35h,2dh,2eh,7 ; bytes for 6845 controller
db 5bh,2,57h,57h ; - graphics mode
db 2,3,0,0
ttable db 61h,50h,52h,0fh ; bytes for 6845 controller
db 19h,6,19h,19h ; - text mode
db 2,0dh,0bh,0ch
attlogo db 'OLIVETTI' ; Olivetti M24/28, AT&T 6300 rom id
attllen equ $-attlogo ; length
toshlogo db ' TT33110000 TTOOSSHHIIBBAA' ; Toshiba T3100 logo
toshlen equ $-toshlogo ; length
declogo db 'Copyright Digital Equipment Corp' ; DEC VAXmate
declen equ $-declogo
dumpname db 'TEKPLT.TIF',0 ; dump name
dumplen equ $-dumpname
dhandle dw -1 ; dump file handle
emsgsname db 'KERMIT ',0 ; 8 byte EMS region name, + safety
emsseg dw 0 ; segment of ems memory
emsbytes dw 0 ; pixel bytes in ems storage
emspage dw 0 ; desired EMS page, used by XMS procs
sixteenk dw 4000h ; 16K, for XMS multiplications
;;;;;;;;;;;;;;; start session save area
even
savegoff label word
ttstate dw tektxt ; state machine control pointer
prestate dw 0 ; previous state, across interruptions
visible db 0 ; 0 to move, 1 to draw a line
tek_hiy dw 0 ; Y coordinate in Tektronix mode
tek_loy db 0
tek_hix dw 0 ; X coordinate in Tektronix mode
tek_lox db 0
tek_lsb db 0 ; Low-order 2 bits of X + low Y
; (4014 mode)
status db 0
lastc db 0 ; last x/y coord fragment seen
bnkchan db 0 ; a flag so we can select which bank
; to write in Wyse 1280*800 mode
colpal db 0,9,0ch,0ah ; VT340 color palette table, IRGB
db 0dh,0bh,0eh,7, 8,1,4,2, 5,3,6,0fh ; 16 bytes, active table
db 256-($-colpal) dup (0) ; to make 256 entries overall
coldef db 0,9,0ch,0ah, 0dh,0bh,0eh,7, 8,1,4,2, 5,3,6,0fh ; color def
mondef db 0,7 dup (0fh), 8 dup (7) ; monochrome default "colors"
havepal db 0 ; 1 if have selected palette
masktab db 80h,40h,20h,10h,8,4,2,1 ; quicker than calculations!
; dashed line patterns
linetab dw 0ffffh ; ESC accent 11111111 11111111
dw 0aaaah ; ESC a 10101010 10101010
dw 0f0f0h ; ESC b 11110000 11110000
dw 0fafah ; ESC c 11111010 11111010
dw 0ffcch ; ESC d 11111111 11001100
dw 0fc92h ; ESC e 11111100 10010010
dw 0ffffh ; ESC x user defined
dw 0ffffh ; ESC y user defined
dw 0ffffh ; ESC z user defined
linepat dw 0ffffh ; active line pattern, from above
ginlpsave dw 0 ; saved linepat while in GIN mode
tekid db escape,'[?63;1;2;4;8;9;15c',0; VT320, level 3, etc
;End of init data
even
xmult dw 1 ; scaling factor for x is
xdiv dw 1 ; xmult/xdiv
ymult dw 1 ; scaling factor for y is
ydiv dw 1 ; ymult/ydiv
xmax dw 640-8 ;
ybot dw 350-1 ;
x_coord dw 0 ; Tek text char X coordinate
y_coord dw 0 ; Tek text char Y coordinate
xcursor dw 0 ; PC x_coord of text cursor symbol
ycursor dw 0 ; PC y_coord of text cursor symbol
save_xcor dw 0 ; save with save-screen
save_ycor dw 0 ; ditto
xcross dw 0 ; crosshair coordinates
ycross dw 0
xcenter dw 0 ; center of screen
ycenter dw 0 ; center of screen
crossactive db 0 ; non-zero if crosshair is active
tekcursor db 1 ; show text cursor (non-zero)
cursorst db 0 ; cursor state (non-zero is displayed)
oldx dw 0 ; Tek coordinates of last point
oldy dw 767 ; initially top left
scalex dw 0 ; PC coord for scaled x value
scaley dw 0 ; for scaled y value
rectx1 dw 0 ; Rectangle PC x lower left corner
recty1 dw 0 ; Rectangle PC y lower left corner
rectx2 dw 0 ; Rectangle PC x width
recty2 dw 0 ; Rectangle PC y height
angle dw 0,0 ; arc worker area
dgxmax dw 640-1 ; DG 470
dgymax dw 480-1
;dgxmax dw 800-1 ; DG 463
;dgymax dw 576-1
numlines dw 0 ; number of lines to fill
charhgt dw 8 ; scan lines per character
charwidth dw 8 ; dots across character cell
fontlptr dd font ; pointer to high bit clear char fonts
fontrptr dd font ; pointer to high bit set char fonts
softptr dw 0 ; seg of active soft font
softlist dw 31 dup (0) ; malloc'd space for soft char sets
dotbuf db 16 dup (0) ; buffer to hold char dot pattern
fontfile db 'EGA.CPI',0 ; DOS Code Page file, ASCIIZ
havefont dw 0 ; holds Code Page if have GRight font
curcharw dw 8 ; char width of cursor font
curgcol dw 0 ; last used colors of cursor
; area fill material
fill db 0 ; current fill byte pattern
fillptr dw filpat1 ; pointer to current fill pattern
fillist dw filpat1,filpat2,filpat3,filpat4,filpat5,filpat6,filpat7
dw filpat8,filpat9,filpat10,filpat11,filpat12,filpat13
dw filpat14
numfil equ ($-fillist)/2 ; number of fill patterns
; fill patterns, 8 bits wide, first byte is at top of PC screen
; 8 bytes per pattern for 8 scan line repetition
filpat1 db 8 dup (0ffh) ; solid fill
filpat2 db 4 dup (0aah, 55h) ; grey (alternating dots)
filpat3 db 80h,01h,02h,04h, 08h,10h,20h,40h ; right to left slant up
filpat4 db 80h,40h,20h,10h, 08h,04h,02h,01h ; left to right slant up
filpat5 db 2 dup (0,0,0aah,0) ; horizontal lines
filpat6 db 8 dup (44h) ; vertical lines
filpat7 db 80h,41h,22h,14h, 08h,14h,22h,41h ; slanted crosshatch
filpat8 db 2 dup (0aah,80h,80h,80h) ; vertical crosshatch
filpat9 db 4 dup (0f0h), 4 dup (0fh) ; checkerboard
filpat10 db 4 dup (44h, 11h) ; dots
filpat11 db 2 dup (10h,28h,44h,82h) ; horizontal herringbone
filpat12 db 80h,40h,20h,10h,08h,10h,20h,40h ; vertical herringbone
filpat13 db 8 dup (0ffh) ; first user definable fill
filpat14 db 8 dup (0ffh) ; second user definable fill
; end of area fill material
defcurpat db 0ffh,6 dup (81h),0ffh ; 8x8 def Tek cursor
dgcurupat db 11 dup (0),0ffh,0ffh,0,0; D463/470 cursor underline pattern
dgcurbpat db 0,12 dup (0ffh),0 ; D463/470 cursor block pattern
dgctype db 0 ; D463/470 last written cursor type
curmode db 0 ; screen mode before graphics
tekgraf db 0 ; Tek graphics board selection (def=auto)
; local variables for LINE plotting routine
graph_mode db 0 ; graphics video mode, default is none
inited db 0 ; non-zero if inited (retains page)
tekident db 0 ; Tek ident request flag
gpage db 0 ; display adapter graphics page
gfcol db 15 ; graphics foreground color
gbcol db 0 ; graphics background color
tfcol db 0 ; temp foreground color
tbcol db 0 ; temp background color
colortb db 0,4,2,6,1,5,3,7 ; color reversed-bit setting bytes
ccode db pixfor ; temp for holding plot color code
bypass db 0 ; GIN mode bypass condition (0=off)
esctype db 0 ; first char after ESCAPE char
bscontrol db 0 ; non-zero for destructive BS
spcontrol db 0 ; non-zero for destructive SPACE
chcontrol db 0 ; char-writing, 1=opaque,0=transparent
even
putc dw mputc ; ptr to plot a character routine
psetup dw psetupm ; ptr to plot setup routine
pincy dw pincym ; ptr to inc y routine
plotptr dw pltmon ; ptr to dot plot routine
gfplot dw bpltmon ; ptr to area-fill plot routine
segscn dw 0b800h ; actual screen segment to use
linelen dw 0 ; offset increment between scan lines
temp dw 0
saveglen dw ($-savegoff) ; length of z save area
;;;;;;;;;;;;;;;;; end of session save area
ten dw 10 ; word 10 for multiplying
mousebuf dw 0 ; segment of mouse save buffer
even
; TIFF version 5.0 data fields
; Reference: Aldus/Microsoft Technical Memorandum dated 8/8/88
; TIFF data item size indicators
uchar equ 1 ; unsigned byte
ascii equ 2 ; asciiz string byte
integer equ 3 ; 16 bit unsigned integer
long equ 4 ; 32 bit unsigned integer
rational equ 5 ; 32 bit numerator, 32 bit denominator
entry struc ; 12 byte image file directory entries
dw ? ; tag
dw integer ; type, of data item
entcnt dd 1 ; length, count of data items
entval dw 0 ; long value or long offset to value
dw 0
entry ends
even ; TIFF 5.0, 8 byte header
header dw 4949h ; 'll', low byte stored first
dw 42 ; TIFF identification, 42 decimal
dw nentry-header,0 ; long offset to image file directory
; Image File Directory
nentry dw entrycnt ; number of entries to follow
; 12-byte directory entries
newsub entry <0feh,long> ; new subfield type
iwidth entry <100h,integer> ; image width, integer for WP 5
ilength entry <101h,integer> ; image length, integer for WP 5
bps entry <102h,,,4> ; bits per sample, 4=iRGB, 1=B/W
comp entry <103h,,,1> ; compression, none
photo entry <106h,,,3> ; photometric interpret, palette
strip entry <111h,long,25,stripoff-header> ; offset to long strip offsets
spp entry <115h,,,1> ; samples/pixel, 1
rps entry <116h,long,1,25> ; long rows per strip
sbc entry <117h,integer,25,stripbc-header> ; offset to strip byte counts
xres entry <11ah,rational,1,xresval-header> ; x axis resolution
yres entry <11bh,rational,1,yresval-header> ; y axis resolution
resunit entry <128h,integer,1,1> ; resolution unit, no absolute units
soft entry <131h,ascii,proglen,prog-header> ; software ident
stamp entry <132h,ascii,dtlen,dandt-header> ; date and time stamp
cmap entry <140h,integer,3*16,colmap-header> ; palette color map
entrycnt equ ($-nentry-2+11)/12 ; compute number of entries for nentry
dd 0 ; long offset of next directory (none)
; supporting data pointed at above
prog db 'MS Kermit 300',0 ; originating program, asciiz
proglen equ $-prog
dandt db '1989:12:25 00:00:01',0 ; date and time format
dtlen equ $-dandt
xresval dw 0,0,1,0 ; two double words (top / bottom)
yresval dw 0,0,1,0 ; two double words (top / bottom)
stripoff dd 25 dup (0) ; long file offset for each strip
stripbc dw 25 dup (0) ; integer byte count for each strip
; color map for red, green, blue; index by IRGB bits from ega sample
none equ 0
dim equ 4000h
norm equ 8000h
bold equ 0ffffh
; dim black,blue,green,cyan, red,magenta,yellow/brown,white
; bold black,blue,green,cyan, red,magenta,yellow,white
colmap dw none, none, none, none, norm, norm, norm, norm+dim ; dim red
dw norm, none, none, none, bold, bold, bold, bold ; bold red
dw none, none, norm, norm, none, none, dim, norm+dim ; dim green
dw norm, none, bold, bold, none, none, bold, bold ; bold green
dw none, norm, none, norm, none, norm, none, norm+dim ; dim blue
dw norm, bold, none, bold, none, bold, none, bold ; bold blue
tifflen equ $-header ; length of header + directory + info
pixdata equ $ ; pixel data start here on disk
; end of TIFF information
esctab db 43 ; table of ESC <char> dispatches
dw escjmp ; address of table for action routines
db ENQ,FF,CAN,CTLZ,'/' ; ^E,^L,^X,^Z,/
db '@ABCD','EFGHI','JKLM'
db 3fh,'PZ[\' ; '?PZ[\'
db 60h,'abcde','fghij','klmno','xyz' ; accent, a..o,x,y,z
; Dispatch for esctab table
even
escjmp dw tekenq, tekcls,tekcan, tekgin,tekeseq ; ^E,^L,^X,^Z,/
dw 14 dup (tekfill) ; '@ABCDEFGHIJKLM'
dw tekqury,tekeseq,sendid,tekeseq,tekgotst ; '?PZ[\'
dw 19 dup (teklpat) ; accent, a..o,x,y,z
; Final char table for ANSI escape sequences
anstab db 21 ; number of entries
dw ansjmp ; address of action routines
db '@ABCD','EFGHJ','KXade','fhlmn','u'
; Dispatch for anstab table
even
ansjmp dw ansich, atcuu, atcud, atcuf, atcub ; '@ABCD'
dw atcnl, atcpl, atcha, atcup, ated ; 'EFGHJ'
dw atel, atech, atcuf, atcva, atcud ; 'KXade'
dw atcup, escexit, escexit, tekcol, tekrid ; 'fhlmn'
dw tekprpt ; 'u'
data ends
data1 segment
; 8*8 font for Hercules and such, CGA, and EGA
; - allows 43 lines, and 80 (90 for Hercules) chars per line.
; all printing (?) characters from <space> to <del> - two characters per line
; 8 bits per scan line, top line given first, 8 scan lines.
font db 0,0,0,0,0,0,0,0, 18h,18h,18h,18h,18h,0,18h,0
db 6ch,6ch,6ch,0,0,0,0,0, 36h,36h,7fh,36h,7fh,36h,36h,0
db 0ch,3fh,68h,3eh,0bh,7eh,18h,0, 60h,66h,0ch,18h,30h,66h,06h,0
db 38h,6ch,6ch,38h,6dh,66h,3bh,0, 0ch,18h,30h,0,0,0,0,0
db 0ch,18h,30h,30h,30h,18h,0ch,0, 30h,18h,0ch,0ch,0ch,18h,30h,0
db 0,18h,7eh,3ch,7eh,18h,0,0, 0,18h,18h,7eh,18h,18h,0,0
db 0,0,0,0,0,18h,18h,30h, 0,0,0,7eh,0,0,0,0
db 0,0,0,0,0,18h,18h,0, 0,06h,0ch,18h,30h,60h,0,0
db 3ch,66h,6eh,7eh,76h,66h,3ch,0, 18h,38h,18h,18h,18h,18h,7eh,0
db 3ch,66h,06h,0ch,18h,30h,7eh,0, 3ch,66h,06h,1ch,06h,66h,3ch,0
db 0ch,1ch,3ch,6ch,7eh,0ch,0ch,0, 7eh,60h,7ch,06h,06h,66h,3ch,0
db 1ch,30h,60h,7ch,66h,66h,3ch,0, 7eh,06h,0ch,18h,30h,30h,30h,0
db 3ch,66h,66h,3ch,66h,66h,3ch,0, 3ch,66h,66h,3eh,06h,0ch,38h,0
db 0,0,18h,18h,0,18h,18h,0, 0,0,18h,18h,0,18h,18h,30h
db 0ch,18h,30h,60h,30h,18h,0ch, 0,0,0,7eh,0,7eh,0,0,0
db 30h,18h,0ch,06h,0ch,18h,30h, 0,3ch,66h,0ch,18h,18h,0,18h,0
db 3ch,66h,6eh,6ah,6eh,60h,3ch, 0,3ch,66h,66h,7eh,66h,66h,66h,0
db 7ch,66h,66h,7ch,66h,66h,7ch, 0,3ch,66h,60h,60h,60h,66h,3ch,0
db 78h,6ch,66h,66h,66h,6ch,78h, 0,7eh,60h,60h,7ch,60h,60h,7eh,0
db 7eh,60h,60h,7ch,60h,60h,60h, 0,3ch,66h,60h,6eh,66h,66h,3ch,0
db 66h,66h,66h,7eh,66h,66h,66h, 0,7eh,18h,18h,18h,18h,18h,7eh,0
db 3eh,0ch,0ch,0ch,0ch,6ch,38h, 0,66h,6ch,78h,70h,78h,6ch,66h,0
db 60h,60h,60h,60h,60h,60h,7eh, 0,63h,77h,7fh,6bh,6bh,63h,63h,0
db 66h,66h,76h,7eh,6eh,66h,66h, 0,3ch,66h,66h,66h,66h,66h,3ch,0
db 7ch,66h,66h,7ch,60h,60h,60h, 0,3ch,66h,66h,66h,6ah,6ch,36h,0
db 7ch,66h,66h,7ch,6ch,66h,66h, 0,3ch,66h,60h,3ch,06h,66h,3ch,0
db 7eh,18h,18h,18h,18h,18h,18h, 0,66h,66h,66h,66h,66h,66h,3ch,0
db 66h,66h,66h,66h,66h,3ch,18h, 0,63h,63h,6bh,6bh,7fh,77h,63h,0
db 66h,66h,3ch,18h,3ch,66h,66h, 0,66h,66h,66h,3ch,18h,18h,18h,0
db 7eh,06h,0ch,18h,30h,60h,7eh, 0,7ch,60h,60h,60h,60h,60h,7ch,0
db 0,60h,30h,18h,0ch,06h,0,0, 3eh,06h,06h,06h,06h,06h,3eh,0
db 18h,3ch,66h,42h,0,0,0,0, 0,0,0,0,0,0,0,0ffh
db 30h,18h,0ch,0,0,0,0,0, 0,0,3ch,06h,3eh,66h,3eh,0
db 60h,60h,7ch,66h,66h,66h,7ch,0, 0,0,3ch,66h,60h,66h,3ch,0
db 06h,06h,3eh,66h,66h,66h,3eh,0, 0,0,3ch,66h,7eh,60h,3ch,0
db 0eh,18h,18h,3ch,18h,18h,18h,0, 0,0,3eh,66h,66h,3eh,06h,3ch
db 60h,60h,7ch,66h,66h,66h,66h,0, 18h,0,38h,18h,18h,18h,3ch,0
db 18h,0,38h,18h,18h,18h,18h,70h, 60h,60h,66h,6ch,78h,6ch,66h,0
db 38h,18h,18h,18h,18h,18h,3ch,0, 0,0,76h,7fh,6bh,6bh,63h,0
db 0,0,7ch,66h,66h,66h,66h,0, 0,0,3ch,66h,66h,66h,3ch,0
db 0,0,7ch,66h,66h,7ch,60h,60h,0, 0,3eh,66h,66h,3eh,06h,07h
db 0,0,6ch,76h,60h,60h,60h,0, 0,0,3eh,60h,3ch,06h,7ch,0
db 30h,30h,7ch,30h,30h,30h,1ch,0, 0,0,66h,66h,66h,66h,3eh,0
db 0,0,66h,66h,66h,3ch,18h,0, 0,0,63h,6bh,6bh,7fh,36h,0
db 0,0,66h,3ch,18h,3ch,66h,0, 0,0,66h,66h,66h,3eh,06h,3ch
db 0,0,7eh,0ch,18h,30h,7eh,0, 0ch,18h,18h,70h,18h,18h,0ch,0
db 18h,18h,18h,0,18h,18h,18h,0, 30h,18h,18h,0eh,18h,18h,30h,0
db 31h,6bh,46h,0,0,0,0,0, 0ffh,6 dup (81h),0ffh
; note, the last 8 bytes comprise the text cursor symbol pattern
; 5x14 font cell, space is on the left, 4 dot descender region
fivedot db 14 dup (0) ; 0 null
db 0,0,0,70h,88h,0d8h,88h,0d8h,0a8h,70h,0,0,0,0 ; 1 happy face
db 0,0,0,70h,0f8h,0a8h,0f8h,0a8h,0d8h,70h,0,0,0,0 ; 2 happy face
db 0,0,0,0d8h,4 dup (0f8h),70h,20h,0,0,0,0 ; 3 heart
db 0,0,0,20h,70h,0f8h,0f8h,70h,70h,20h,0,0,0,0 ; 4 diamond
db 0,0,0,70h,20h,0a8h,0f8h,0a8h,20h,20h,0,0,0,0 ; 5 club
db 0,0,0,20h,70h,0f8h,0f8h,0a8h,20h,20h,0,0,0,0 ; 6 spade
db 4 dup (0),20h,70h,70h,70h,20h,5 dup (0) ; 7 dot
db 5 dup (0f8h),0d8h,98h,98h,0d8h,5 dup (0f8h) ; 8 floppy
db 4 dup (0),20h,50h,98h,98h,50h,20h,0,0,0,0 ; 9 circle
db 4 dup (0f8h),0d8h,0a8h,70h,70h,0a8h,0d8h,4 dup (0f8h) ; 10
db 0,0,0,18h,8,20h,50h,98h,50h,20h,0,0,0,0 ; 11 male
db 5 dup (0),20h,50h,98h,50h,20h,20h,70h,20h,0 ; 12 female
db 0,0,0,30h,28h,20h,20h,20h,0e0h,0c0h,0,0,0,0 ; 13 note
db 0,0,0,40h,70h,50h,70h,50h,0d0h,0d0h,30h,30h,0,0 ; 14 notes
db 0,0,20h,98h,20h,70h,70h,20h,98h,20h,0,0,0,0 ; 15 sun
db 0,0,0,40h,60h,70h,78h,70h,60h,40h,0,0,0,0 ; 16 rt arrow
db 0,0,0,8,18h,38h,78h,38h,18h,8,0,0,0,0 ; 17 lft arrow
db 0,20h,50h,98h,20h,20h,20h,98h,50h,20h,0,0,0,0 ; 18 t/b arrow
db 0,0,6 dup (50h),0,50h,0,0,0,0 ; 19 dbl bang
db 0,0,0,78h,0a8h,0a8h,68h,28h,28h,28h,0,0,0,0 ; 20 paragraph
db 0,20h,50h,40h,20h,50h,20h,10h,50h,20h,0,0,0,0 ; 21 section
db 5 dup (0),70h,70h,7 dup (0) ; 22 bar
db 0,20h,50h,98h,20h,20h,20h,98h,50,20h,0,0f8h,0,0 ; 23 arrow,bar
db 0,20h,50h,98h,6 dup (20h),0,0,0,0 ; 24 up arrow
db 0,0,5 dup (20h),98h,50h,20h,0,0,0,0 ; 25 dn arrow
db 0,0,0,20h,10h,0e8h,10h,20h,6 dup (0) ; 26 rt arrow
db 0,0,0,20h,40h,0b8h,40h,20h,6 dup (0) ; 27 lf arrow
db 5 dup (0),40h,40h,78h,6 dup (0) ; 28
db 4 dup (0),50h,98h,50h,7 dup (0) ; 29
db 4 dup (0),20h,70h,0f8h,7 dup (0) ; 30 up triang
db 4 dup (0),0f8h,70h,20h,7 dup (0) ; 31 dn traing
db 14 dup (0) ; space
db 0,0,20h,20h,20h,20h,20h,0,20h,0,0,0,0,0 ; !
db 0,0,50h,50h,50h,9 dup (0) ; "
db 0,0,50h,50h,0f8h,50h,50h,0f8h,50h,50h,0,0,0,0 ; #
db 0,20h,30h,60h,40h,60h,30h,30h,60h,20h,0,0,0,0 ; $
db 0,0,0c0h,0c8h,10h,20h,40h,98h,18h,0,0,0,0,0 ; %
db 0,20h,50h,70h,20h,68h,90h,90h,90h,68h,0,0,0,0 ; &
db 0,0,20h,20h,20h,9 dup (0) ; '
db 0,0,10h,20h,40h,40h,40h,40h,20h,10h,0,0,0,0 ; (
db 0,0,40h,20h,10h,10h,10h,10h,20h,40h,0,0,0,0 ; )
db 0,0,0,20h,0a8h,70h,70h,70h,0a8h,20h,0,0,0,0 ; *
db 0,0,20h,20h,20h,0f8h,20h,20h,20h,0,0,0,0,0 ; +
db 8 dup (0),10h,10h,10h,20h,0,0 ; ,
db 5 dup (0),70h,8 dup (0) ; -
db 8 dup (0),20h,20h,0,0,0,0 ; .
db 0,0,0,0,08h,10h,20h,40h,80h,5 dup (0) ; /
db 0,0,78h,48h,48h,58h,68h,48h,48h,78h,0,0,0,0 ; 0
db 0,0,20h,60h,5 dup (20h),70h,0,0,0,0 ; 1
db 0,0,70h,50h,10h,30h,60h,40h,40h,70h,0,0,0,0 ; 2
db 0,0,70h,50h,10h,30h,10h,10h,50h,70h,0,0,0,0 ; 3
db 0,0,10h,30h,30h,50h,50h,78h,10h,10h,0,0,0,0 ; 4
db 0,0,70h,40h,40h,70h,10h,10h,50h,70h,0,0,0,0 ; 5
db 0,0,70h,50h,40h,40h,70h,50h,50h,70h,0,0,0,0 ; 6
db 0,0,70h,10h,10h,10h,20h,20h,40h,40h,0,0,0,0 ; 7
db 0,0,70h,50h,50h,70h,50h,50h,50h,70h,0,0,0,0 ; 8
db 0,0,70h,50h,50h,70h,10h,10h,50h,70h,0,0,0,0 ; 9
db 0,0,0,20h,20h,0,0,20h,20h,5 dup (0) ; :
db 5 dup (0),20h,20h,0,0,20h,20h,40h,0,0 ; ;
db 0,0,08h,10h,20h,40h,20h,10h,08h,5 dup(0) ; <
db 0,0,0,0,70h,0,70h,7 dup (0) ; =
db 0,0,40h,20h,10h,08h,10h,20h,40h,5 dup (0) ; >
db 0,0,70h,50h,10h,30h,20h,20h,0,20h,0,0,0,0 ; ?
db 0,0,0,78h,88h,0b8h,0a8h,0b8h,80h,70h,0,0,0,0 ; @
db 0,0,30h,48h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A
db 0,0,70h,48h,48h,70h,50h,48h,48h,70h,0,0,0,0 ; B
db 0,0,30h,48h,4 dup (40h),48h,30h,0,0,0,0 ; C
db 0,0,70h,48h,4 dup (48h),48h,70h,0,0,0,0 ; D
db 0,0,78h,40h,40h,70h,40h,40h,40h,78h,0,0,0,0 ; E
db 0,0,78h,40h,40h,70h,40h,40h,40h,40h,0,0,0,0 ; F
db 0,0,30h,48h,40h,40h,58h,48h,48h,38h,0,0,0,0 ; G
db 0,0,48h,48h,48h,78h,48h,48h,48h,48h,0,0,0,0 ; H
db 0,0,70h,6 dup (20h),70h,0,0,0,0 ; I
db 0,0,38h,10h,10h,10h,10h,50h,50h,070h,0,0,0,0 ; J
db 0,0,48h,48h,50h,60h,60h,50h,50h,48h,0,0,0,0 ; K
db 0,0,7 dup (40h),70h,0,0,0,0 ; L
db 0,0,48h,78h,78h,5 dup (48h),0,0,0,0 ; M
db 0,0,48h,48h,48h,68h,58h,48h,48h,48h,0,0,0,0 ; N
db 0,0,30h,6 dup (48h),30h,0,0,0,0 ; O
db 0,0,70h,48h,48h,48h,70h,40h,40h,40h,0,0,0,0 ; P
db 0,0,30h,48h,48h,48h,48h,58h,58h,30h,10h,0,0,0 ; Q
db 0,0,70h,48h,48h,70h,50h,50h,48h,48h,0,0,0,0 ; R
db 0,0,30h,50h,40h,60h,30h,10h,50h,60h,0,0,0,0 ; S
db 0,0,0f8h,7 dup (20h),0,0,0,0 ; T
db 0,0,7 dup (48h),78h,0,0,0,0 ; U
db 0,0,6 dup (48h),30h,30h,0,0,0,0 ; V
db 0,0,5 dup (48h),78h,78h,48h,0,0,0,0 ; W
db 0,0,50h,50h,50h,20h,20h,50h,50h,50h,0,0,0,0 ; X
db 0,0,88h,88h,50h,50h,20h,20h,20h,20h,0,0,0,0 ; Y
db 0,0,78h,08h,10h,10h,20h,20h,40h,78h,0,0,0,0 ; Z
db 0,0,70h,6 dup (40h),70h,0,0,0,0 ; [
db 0,0,0,0,80h,40h,20h,10h,08h,5 dup (0) ; \
db 0,0,70h,6 dup (10h),70h,0,0,0,0 ; ]
db 0,0,20h,50h,88h,9 dup (0) ; ^
db 10 dup (0),0f8h,0,0,0 ; _
db 0,0,40h,60h,10h,9 dup (0) ; `
db 5 dup (0),70h,10h,70h,50h,78h,0,0,0,0 ; a
db 0,0,40h,40h,40h,70h,50h,50h,50h,70h,0,0,0,0 ; b
db 5 dup (0),70h,50h,40h,50h,70h,0,0,0,0 ; c
db 0,0,10h,10h,10h,70h,50h,50h,50h,70h,0,0,0,0 ; d
db 5 dup (0),70h,50h,70h,40h,70h,0,0,0,0 ; e
db 0,0,30h,20h,20h,70h,20h,20h,20h,20h,0,0,0,0 ; f
db 5 dup (0),70h,50h,50h,70h,10h,50h,70h,0,0 ; g
db 0,0,40h,40h,40h,70h,50h,50h,50h,50h,0,0,0,0 ; h
db 0,0,0,20h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i
db 0,0,0,10h,0,30h,10h,10h,10h,50h,70h,0,0,0 ; j
db 0,0,40h,40h,40h,48h,50h,60h,50h,48h,0,0,0,0 ; k
db 0,0,60h,6 dup (20h),70h,0,0,0,0 ; l
db 5 dup (0),0d8h,0f8h,0a8h,88h,88h,0,0,0,0 ; m
db 5 dup (0),0f0h,4 dup (50h),0,0,0,0 ; n
db 5 dup (0),70h,50h,50h,50h,70h,0,0,0,0 ; o
db 5 dup (0),70h,50h,50h,50h,70h,40h,40h,0,0 ; p
db 5 dup (0),70h,50h,50h,50h,70h,10h,10h,0,0 ; q
db 5 dup (0),58h,60h,40h,40h,40h,0,0,0,0 ; r
db 5 dup (0),30h,40h,20h,10h,60h,0,0,0,0 ; s
db 0,0,20h,20h,20h,70h,20h,20h,20h,30h,0,0,0,0 ; t
db 5 dup (0),4 dup (50h),70h,0,0,0,0 ; u
db 5 dup (0),50h,50h,50h,20h,20h,0,0,0,0 ; v
db 5 dup (0),88h,0a8h,0a8h,0a8h,50h,0,0,0,0 ; w
db 5 dup (0),88h,50h,20h,50h,88h,0,0,0,0 ; x
db 5 dup (0),4 dup (50h),30h,10h,70h,0,0 ; y
db 5 dup (0), 70h,10h,20h,40h,70h,0,0,0,0 ; z
db 0,0,0,30h,20h,20h,60h,20h,20h,30h,0,0,0,0 ; {
db 0,0,8 dup (20h),0,0,0,0 ; |
db 0,0,0,60h,20h,20h,30h,20h,20h,60h,0,0,0,0 ; }
db 0,0,0,40h,0a8h,10h,8 dup (0) ; ~
db 0,0,0,20h,50h,98h,98h,98h,0f8h,5 dup (0) ; 127 DEL
; begin CP437 GRight
gr437 db 0,0,30h,48h,40h,40h,40h,40h,48h,30h,10h,70h,0,0 ; Cedillia
db 0,0,48h,0,0,4 dup (48h),78h,0,0,0,0 ; u umlate
db 0,0,10h,20h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e accent
db 0,0,20h,50h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a caret
db 0,0,0,50h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a umlate
db 0,0,40h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a accent
db 0,20h,50h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a ring
db 5 dup (0),70h,50h,40h,50h,70h,20h,60h,0,0 ; cedillia
db 0,0,20h,50h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e caret
db 0,0,0,50h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e umlate
db 0,0,40h,20h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e accent
db 0,0,0,50h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i umlate
db 0,0,20h,50h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i caret
db 0,0,40h,20h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i accent
db 0,28h,0,30h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A umlate
db 10h,28h,10h,30h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A ring
db 10h,20h,0,78h,40h,40h,70h,40h,40h,78h,0,0,0,0 ; E accent
db 5 dup (0),78h,0a8h,0b8h,0d0h,0b8h,0,0,0,0 ; ae
db 0,0,78h,0a0h,0a0h,0b0h,0a0h,0e0h,0a0h,0b8h,0,0,0,0 ; AE
db 0,0,20h,50h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o caret
db 0,0,0,50h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o umlate
db 0,0,40h,20h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o accent
db 0,0,20h,50h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u caret
db 0,0,40h,20h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u accent
db 0,0,0,50h,0,4 dup (50h),30h,10h,70h,0,0 ; y umlate
db 0,28h,0,30h,5 dup (48h),30h,0,0,0,0 ; O umlate
db 0,28h,0,6 dup (48h),78h,0,0,0,0 ; U umlate
db 0,20h,20h,70h,50h,40h,50h,70h,20h,20h,0,0,0,0 ; cent sign
db 0,30h,28h,20h,20h,70h,20h,20h,40h,78h,0,0,0,0 ; Sterling
db 0,0,88h,88h,50h,20h,70h,20h,70h,20h,0,0,0,0 ; Yen
db 0,0,0e0h,90h,90h,0e0h,80h,90h,0b8h,90h,18h,0,0,0 ; Piaster
db 0,10h,28h,20h,20h,70h,20h,20h,0c0h,40h,0,0,0,0 ; Florin
db 0,0,10h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a accent
db 0,0,20h,40h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i accent
db 0,0,10h,20h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o accent
db 0,0,10h,20h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u accent
db 0,0,28h,50h,0,60h,50h,50h,50h,50h,0,0,0,0 ; n tilde
db 0,28h,50h,0,48h,48h,68h,58h,48h,48h,0,0,0,0 ; N tilde
db 0,70h,50h,78h,0,78h,8 dup (0) ; male ord
db 0,70h,50h,70h,0,78h,8 dup (0) ; female ord
db 0,0,10h,0,10h,10h,20h,40h,48h,30h,0,0,0,0 ; inv query
db 5 dup (0),78h,40h,40h,6 dup (0) ; inv not
db 5 dup (0),78h,8,8,6 dup (0) ; not
db 40h,40h,48h,50h,20h,78h,88h,18h,20h,38h,0,0,0,0 ; one half
db 40h,40h,48h,50h,28h,58h,0a8h,48h,78h,10h,0,0,0,0 ; one quarter
db 0,0,0,20h,0,5 dup (20h),0,0,0,0 ; inv bang
db 0,0,0,0,28h,50h,0a0h,50h,28h,0,0,0,0,0 ; left chevron
db 0,0,0,0,0a0h,50h,28h,50h,0a0h,0,0,0,0,0 ; rgt chevron
db 90h,48h,20h,90h,48h,20h,90h,48h,20h,90h,48h,20h,90h,48h
db 0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h
db 48h,0a0h,20h,48h,0a0h,20h,48h,0a0h,20h,48h,0a0h,20h,48h,0a0h
db 14 dup (30h)
db 5 dup (30h),0f0h,8 dup (30h)
db 4 dup (30h),0f0h,30h,30h,0f0h,6 dup (30h)
db 6 dup (50h),0d0h,7 dup (50h)
db 6 dup (0),0f0h,7 dup (50h)
db 4 dup (0),0f0h,30h,30h,0f0h,6 dup (30h)
db 4 dup (50h),0d0h,50h,50h,0d0h,6 dup (50h)
db 14 dup (50h) ; 186
db 4 dup (0),0f0h,10h,10h,0d0h,6 dup (50h)
db 4 dup (50h),0d0h,10h,10h,0f0h,6 dup (0)
db 5 dup (50h),0f0h,8 dup (0)
db 4 dup (30h),0f0h,30h,30h,0f0h,6 dup (0)
db 4 dup (0),0f0h,9 dup (30h)
db 5 dup (30h),038h,8 dup (0) ; 192
db 5 dup (30h),0f8h,8 dup (0)
db 5 dup (0),0f8h,8 dup (30h)
db 5 dup (30h),38h,8 dup (30h)
db 5 dup (0),0f8h,8 dup (0) ; 196
db 5 dup (30h),0f8h,8 dup (30h)
db 4 dup (30h),38h,30h,30h,38h,6 dup (30h)
db 5 dup (50h),58h,8 dup (50h)
db 4 dup (50h),58h,40h,40h,48h,6 dup (0)
db 4 dup (0),78h,40h,40h,58h,6 dup (50h)
db 4 dup (50h),58h,40h,40h,48h,6 dup (0)
db 4 dup (0),0f0h,0,0,0d8h,6 dup (50h) ; 202
db 4 dup (50h),58h,40h,40h,58h,6 dup (50h)
db 4 dup (0),0f8h,0,0,0f8h,6 dup (0) ; 205
db 4 dup (50h),0d8h,0,0,0d8h,6 dup (50h)
db 5 dup (30h),0f8h,0,0f8h,6 dup (0)
db 5 dup (50h),0f8h,8 dup (0)
db 4 dup (0),0f8h,0,0,0f8h,6 dup (30h)
db 5 dup (0),0f8h,8 dup (50h)
db 5 dup (50h),0f8h,8 dup (0)
db 4 dup (30h),38h,30h,30h,38h,6 dup (0)
db 4 dup (0),38h,30h,30h,38h,6 dup (30h) ; 213
db 5 dup (0),78h,8 dup (50h)
db 5 dup (50h),0d8h,8 dup (50h)
db 4 dup (30h),0f8h,0,0,0f8h,6 dup (30h)
db 5 dup (30h),0f0h,8 dup (0)
db 5 dup (0),38h,8 dup (30h) ; 218
db 14 dup (0f8h)
db 7 dup (0),7 dup (0f8h)
db 14 dup (0e0h)
db 7 dup (0f8h),7 dup (0)
db 14 dup (38h)
db 0,0,0,60h,98h,90h,90h,90h,98h,60h,0,0,0,0 ; Alpha
db 0,0,0,0,70h,48h,70h,48h,48h,70h,40h,40h,20h,0 ; Beta
db 0,0,78h,48h,6 dup (40h),0,0,0,0 ; Gamma
db 0,0,0,0,0f8h,5 dup (50h),0,0,0,0 ; Pi
db 0,0,78h,48h,20h,10h,10h,20h,48h,78h,0,0,0,0 ; Sigma
db 0,0,0,0,78h,90h,90h,90h,90h,60h,0,0,0,0 ; sigma
db 5 dup (0),4 dup (48h),78h,40h,40h,80h,0 ; mu
db 0,0,0,50h,0a8h,20h,20h,20h,20h,10h,0,0,0,0 ; tau
db 0,0,0f8h,20h,70h,98h,98h,70h,20h,0f8h,0,0,0,0 ; Phi
db 0,0,30h,48h,48h,78h,48h,48h,48h,30h,0,0,0,0 ; Theta
db 0,0,70h,4 dup (90h),50h,50h,0d8h,0,0,0,0 ; Omega
db 0,0,70h,48h,20h,50h,98h,98h,98h,70h,0,0,0,0 ; delta
db 4 dup (0),50h,98h,98h,98h,98h,50h,0,0,0,0 ; infinity
db 0,0,30h,48h,48h,58h,68h,48h,0c8h,30h,0,0,0,0 ; phi
db 0,0,18h,20h,40h,78h,40h,40h,20h,18h,0,0,0,0 ; epsilon
db 0,0,0,30h,6 dup (48h),0,0,0,0 ; intersect
db 0,0,0,70h,0,70h,0,70h,6 dup (0) ; defined
db 0,0,20h,20h,70h,20h,20h,0,70h,5 dup (0) ; +/-
db 0,40h,20h,10h,8,10h,20h,40h,0,78h,0,0,0,0 ; geq
db 0,8,10h,20h,40h,20h,10h,8,0,78h,0,0,0,0 ; leq
db 0,0,30h,48h,48h,40h,40h,20h,20h,5 dup (10h) ; integral top
db 4 dup (10h),5 dup (8),48h,48h,30h,0,0 ; integral bot
db 4 dup (0),10h,0,78h,0,10h,5 dup (0) ; divide
db 4 dup (0),28h,50h,0,28h,50h,5 dup (0) ; approx equ
db 4 dup (0),30h,48h,48h,30h,6 dup (0) ; open circle
db 4 dup (0),30h,78h,78h,30h,6 dup (0) ; closed circ
db 4 dup (0),30h,78h,78h,30h,6 dup (0) ; bullet
db 0,0,18h,4 dup (10h),0d0h,30h,10h,0,0,0,0 ; sqrt
db 0,10h,68h,48h,48h,48h,8 dup (0) ; super n
db 0,20h,50h,10h,20h,40h,70h,7 dup (0) ; super 2
db 4 dup (0),5 dup (30h),5 dup (0) ; square
db 14 dup (0) ; 255, empty
; begin CP850 GRight
gr850 db 0,0,30h,48h,40h,40h,40h,40h,48h,30h,10h,70h,0,0 ; Cedillia
db 0,0,48h,0,0,4 dup (48h),78h,0,0,0,0 ; u umlate
db 0,0,10h,20h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e accent
db 0,0,20h,50h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a caret
db 0,0,0,50h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a umlate
db 0,0,40h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a accent
db 0,20h,50h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a ring
db 5 dup (0),70h,50h,40h,50h,70h,20h,60h,0,0 ; cedillia
db 0,0,20h,50h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e caret
db 0,0,0,50h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e umlate
db 0,0,40h,20h,0,70h,50h,70h,40h,70h,0,0,0,0 ; e accent
db 0,0,0,50h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i umlate
db 0,0,20h,50h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i caret
db 0,0,40h,20h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i accent
db 0,28h,0,30h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A umlate
db 10h,28h,10h,30h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A ring
db 10h,20h,0,78h,40h,40h,70h,40h,40h,78h,0,0,0,0 ; E accent
db 5 dup (0),78h,0a8h,0b8h,0d0h,0b8h,0,0,0,0 ; ae
db 0,0,78h,0a0h,0a0h,0b0h,0a0h,0e0h,0a0h,0b8h,0,0,0,0 ; AE
db 0,0,20h,50h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o caret
db 0,0,0,50h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o umlate
db 0,0,40h,20h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o accent
db 0,0,20h,50h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u caret
db 0,0,40h,20h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u accent
db 0,0,0,50h,0,4 dup (50h),30h,10h,70h,0,0 ; y umlate
db 0,28h,0,30h,5 dup (48h),30h,0,0,0,0 ; O umlate
db 0,28h,0,6 dup (48h),78h,0,0,0,0 ; U umlate
db 4 dup (0),8h,78h,58h,48h,68h,78h,80h,0,0,0 ; o slash
db 0,30h,28h,20h,20h,70h,20h,20h,40h,78h,0,0,0,0 ; Sterling
db 0,0,0,38h,48h,58h,48h,68h,48h,0b0h,0,0,0,0 ; O slash
db 0,0,0,88h,50h,20h,50h,88h,0,0,0,0,0,0 ; times (x)
db 0,10h,28h,20h,20h,70h,20h,20h,0c0h,40h,0,0,0,0 ; Florin
db 0,0,10h,20h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a accent
db 0,0,20h,40h,0,60h,20h,20h,20h,70h,0,0,0,0 ; i accent
db 0,0,10h,20h,0,70h,50h,50h,50h,70h,0,0,0,0 ; o accent
db 0,0,10h,20h,0,50h,50h,50h,50h,70h,0,0,0,0 ; u accent
db 0,0,28h,50h,0,60h,50h,50h,50h,50h,0,0,0,0 ; n tilde
db 0,28h,50h,0,48h,48h,68h,58h,48h,48h,0,0,0,0 ; N tilde
db 0,70h,50h,78h,0,78h,8 dup (0) ; male ord
db 0,70h,50h,70h,0,78h,8 dup (0) ; female ord
db 0,0,10h,0,10h,10h,20h,40h,48h,30h,0,0,0,0 ; inv query
db 0,0,70h,88h,0f8h,0d8h,0f8h,0d0h,70h,5 dup (0) ; registered
db 5 dup (0),78h,8,8,6 dup (0) ; not
db 40h,40h,48h,50h,20h,78h,88h,18h,20h,38h,0,0,0,0 ; one half
db 40h,40h,48h,50h,28h,58h,0a8h,48h,78h,10h,0,0,0,0 ; one quarter
db 0,0,0,20h,0,5 dup (20h),0,0,0,0 ; inv bang
db 0,0,0,0,28h,50h,0a0h,50h,28h,0,0,0,0,0 ; left chevron
db 0,0,0,0,0a0h,50h,28h,50h,0a0h,0,0,0,0,0 ; rgt chevron
db 90h,48h,20h,90h,48h,20h,90h,48h,20h,90h,48h,20h,90h,48h
db 0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h,0a8h,50h
db 48h,0a0h,20h,48h,0a0h,20h,48h,0a0h,20h,48h,0a0h,20h,48h,0a0h
db 14 dup (30h)
db 5 dup (30h),0f0h,8 dup (30h)
db 10h,20h,0,30h,48h,48h,78h,48h,48h,48h,4 dup (0) ; A acute
db 10h,28h,0,30h,48h,48h,78h,48h,48h,48h,4 dup (0) ; A caret
db 20h,10h,0,30h,48h,48h,78h,48h,48h,48h,4 dup (0) ; A grave
db 0,70h,88h,0a8h,0d8h,0a8h,0d8h,0a8h,88h,70h,4 dup (0);copyright
db 4 dup (50h),0d0h,50h,50h,0d0h,6 dup (50h)
db 14 dup (50h) ; 184
db 4 dup (0),0f0h,10h,10h,0d0h,6 dup (50h)
db 4 dup (50h),0d0h,10h,10h,0f0h,6 dup (0)
db 0,20h,20h,70h,50h,40h,50h,70h,20h,20h,0,0,0,0 ; cent sign
db 0,0,88h,88h,50h,20h,70h,20h,70h,20h,0,0,0,0 ; Yen
db 4 dup (0),0f0h,9 dup (30h)
db 5 dup (30h),0f0h,8 dup (0)
db 5 dup (30h),0f8h,8 dup (0)
db 5 dup (0),0f8h,8 dup (30h)
db 5 dup (30h),38h,8 dup (30h)
db 5 dup (0),0f8h,8 dup (0) ; 196
db 5 dup (30h),0f8h,8 dup (30h)
db 0,0,28h,50h,0,70h,10h,70h,50h,78h,0,0,0,0 ; a tilde
db 28h,50h,0,30h,48h,48h,78h,48h,48h,48h,0,0,0,0 ; A tilde
db 4 dup (50h),58h,40h,40h,48h,6 dup (0)
db 4 dup (0),78h,40h,40h,58h,6 dup (50h)
db 4 dup (50h),58h,40h,40h,48h,6 dup (0)
db 4 dup (0),0f0h,0,0,0d8h,6 dup (50h) ; 202
db 4 dup (50h),58h,40h,40h,58h,6 dup (50h)
db 4 dup (0),0f8h,0,0,0f8h,6 dup (0) ; 205
db 4 dup (50h),0d8h,0,0,0d8h,6 dup (50h)
db 0,88h,0,70h,88h,88h,88h,70h,0,88h,4 dup (0) ; sun/currency
db 0,0,10h,60h,60h,90h,28h,48h,48h,30h,4 dup (0) ; Icelandic d
db 0,0,70h,50h,48h,0e8h,48h,48h,50h,70h,0,0,0,0 ; Icelandic D
db 20h,50h,0,78h,40h,40h,70h,40h,40h,78h,0,0,0,0 ; E caret
db 0,28h,0,78h,40h,40h,70h,40h,40h,78h,0,0,0,0 ; E umlate
db 20h,10h,0,78h,40h,40h,70h,40h,40h,78h,0,0,0,0 ; E accent
db 3 dup (0),20h,60h,20h,20h,20h,70h,5 dup (0) ; numeral 1
db 28h,50h,0,70h,5 dup (20h),70h,0,0,0,0 ; I tilde
db 20h,50h,0,70h,5 dup (20h),70h,0,0,0,0 ; I caret
db 0,50h,0,70h,5 dup (20h),70h,0,0,0,0 ; I umlate
db 5 dup (30h),0f0h,8 dup (0)
db 5 dup (0),38h,8 dup (30h) ; 218
db 14 dup (0f8h)
db 7 dup (0),7 dup (0f8h)
db 0,4 dup (20h),0,4 dup (20h),0,0,0,0 ; v bkn bar
db 20h,10h,0,70h,5 dup (20h),70h,0,0,0,0 ; I grave
db 14 dup (38h)