-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddega.asm
1315 lines (1201 loc) · 20.7 KB
/
ddega.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
;
;should be all ega handling routines for the game !
;
cseg segment public 'code'
PUBLIC INIT_DUMMYega,DOWN_LOADega,SCROLL_Uega
public sCROLL_Dega,SCROLL_Rega,SCROLL_Lega
public head_ega,level_ega,ptxt_ega
PUBLIC pnum,pscore
public cvttxt,big_num
extrn ptxt:near,strength_bar:near,head:near
assume cs: cseg, ds: dseg
d_scrn_w equ 36 ;144/4
gap equ 6 ;24/4
include ddeqfile
; fuckin ace 8086 programming discovery !!
;rep movs byte ptr es:[si],byte ptr es:[di]
; fuckin ace 8086 programming discovery !!
cvert macro
; change from si being code to being address
xchg ax,si
xchg al,ah
and ah,1
shl ax,1 ;2
shl ax,1 ;4
shl ax,1 ;8
shl ax,1 ;16
shl ax,1 ;32
shl ax,1 ;64
shl ax,1 ;128
xchg ax,si
;mov si,512 ;is there anybody there !
endm
put_ch_plane:
rept 15
movsw
add di,bx
endm
movsw
ret
put_ch_planew:
AND DI,CX ;?
rept 15
movsw ;dont need to check within byte ! phew !
add di,bx
and di,cx
endm
movsw
ret
put_chiteega:
;get chite from address in SI and place at DI on screen.
;si points to chite di points to posn in dummy screen 0-8192
push es
push ds
push bx
; cvert ;already been done !
;assume ds points to dseg
les ax,dum_ptr
lds ax,chite_ptr
mov bx,d_scrn_w-2
mov bp,di ;store posn !
cmp di,8192-d_scrn_w*16
ja ch_wrap ;if chite needs wrap check then do so !
call put_ch_plane
mov di,bp
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_plane
mov di,bp ;restore posn
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_plane
mov di,bp ;restore posn
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_plane
pop bx
pop ds
pop es
;grief should be 64 words now moved
ret
ch_wrap:
push cx
mov cx,8191
call put_ch_planew
mov di,bp
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_planew
mov di,bp ;restore posn
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_planew
mov di,bp ;restore posn
mov ax,es
add ax,8192/16
mov es,ax
call put_ch_planew
pop cx
pop bx
pop ds
pop es
;grief should be 64 words now moved
ret
head_ega:
ret ;in case it gets called !
ptxt_ega:
;text print routine for graphics modes
;si points to text in ds
;dl,dh = x,y of byte ? coords ? 0-79/0-199
;addr = y*40+x
;ega version piece oh piss !
push es
mov ax,bscrn
xor ah,2 ;flip screens ? DELETE LATER ! err why delete??
mov ax,0a000h ;one here !
mov es,ax ;destin of altering screen
;that ensures data always goes to back screen ! IE INVISIBLE !
push dx
push bx
mov al,dh
xor ah,ah
shl ax,1
shl ax,1
shl ax,1 ;*8
mov bx,ax
shl ax,1
shl ax,1 ;*32
add ax,bx ;*40
xor dh,dh
add ax,dx
mov di,ax ;= screen address
;set ega to write to ALL planes at once !
;could have colour choice via this line
; for effing vga black is now colour 14 !
mov colr,15 ;!
cmp sixteencol,3
jne not_vg
mov colr,10 ;white is 10 not 15
not_vg:
mov ax,0f02h
mov dx,3c4h
out dx,ax ; set the sequencer reg. write mode is 0 ?
mov dx,3ceh ;controller
mov ax,0a05h
out dx,ax ;write mode 2 read mode 1
mov ax,03h ;er rmw bits
out dx,ax
mov ax,0007h
out dx,ax ;'dont care' for all colours
push bp
mov bp,offset char_map ;must reload each time
ech_lupe:
mov bx,bp ;must reload each time
lodsb
;read character
or al,al
jp_z eol
sub al,32 ;data starts at space but is cont from then
xor ah,ah
shl ax,1
shl ax,1
shl ax,1 ;*8
add bx,ax
push si
mov si,bx
; change the text routine to mask in the text I reckon !
; I hope that 1. will impress Nick 2. sort out the black problem !
; note dx = 3c4h hence is set up okay.
mov bl,colr
xor bh,bh
mov al,8 ;mask register
rept 7
mov ah,[si]
inc si
out dx,ax
and es:[di],bl ;byte !
;out dx,ax
and es:[di+8192],bl
not ah
out dx,ax
and es:[di],bh
;out dx,ax
and es:[di+8192],bh
add di,40
endm
mov ah,[si]
out dx,ax
and es:[di],bl ;byte !
;out dx,ax
and es:[di+8192],bl
not ah
out dx,ax
and es:[di],bh
;out dx,ax
and es:[di+8192],bh
sub di,40*7-1
pop si
jmp ech_lupe
;@@@@@@@@@@@@@@@@@@@@@@@
eol:
mov ax,5
out dx,ax
mov ax,3
out dx,ax
mov ax,0ff08h
out dx,ax
mov ax,0f07h
out dx,ax ;some defaults
pop bp
pop bx
pop dx
pop es
ret
level_ega:
;draw the level or strength bar for a particular player
; Entry ax=strength 0-160
; di=x coord of the bar (characters)
; cx=colour red or blue
; set up using r_p/b_p/b_p/i_p
; draw characters of colour then overlay with grid.
; crikey will need diff colours if vga ! cor!
cld
push es
push cx
push ax
add di,40*188 ;posn at bottom of screen
mov bp,di
mov ax,bscrn
mov es,ax
write r_p+g_p+b_p+i_p ;white
cmp sixteencol,3
jp_e vga_level
mov al,128 ;left most pixel
mov cx,6 ;one more than blocks
grid_lp:
stosb ;writes to correct bit plane !
xx=39
rept 7
mov es:[di+xx],al
xx=xx+40
endm
loop grid_lp
mov di,bp
sub di,40 ;on line above grid
mov ax,-1
stosw
stosw
stosb ;=5 characters
mov byte ptr es:[di],128
add di,40*9-5
stosw
stosw
stosb
mov byte ptr es:[di],128
mov di,bp
pop cx ;get count
pop ax ; then colour gone into ah
or cx,cx ;is count zero ?
je nochar
;now select colour for ega
mov al,2 ;write to planes
mov dx,3c4h
out dx,ax
mov ax,-1 ;set all pixels
chblcklp:
stosb ;writes to correct bit plane !
xx=39
rept 7
mov es:[di+xx],al
xx=xx+40
endm
loop chblcklp
;thats the characters done now the grid
nochar:
pop es
ret
vga_level:
; Its a vga version only colours
; background = 14
; lhs one wants to be 12
; rhs one wants to be 11
; white is colour 10
mov ax,0402h ;i think that is totally wrong !
mov dx,3c4h
out dx,ax
sub di,1
mov al,254 ;right most pixel now !
stosb ;writes to correct bit plane !
xx=39
rept 7
mov es:[di+xx],al
xx=xx+40
endm
mov ax,0f02h ;i think that is totally wrong !
mov dx,3c4h
out dx,ax
; clear out all the fucking shit
mov cx,5
mov al,0 ;or 255 cant think off hand !
alpxv:
stosb ;writes to correct bit plane !
xx=39
rept 7
mov es:[di+xx],al
xx=xx+40
endm
loop alpxv
mov ax,0402h ;i think that is totally wrong !
mov dx,3c4h
out dx,ax
mov al,127 ;128 ;left most pixel
;add di,5
stosb ;writes to correct bit plane !
xx=39
rept 7
mov es:[di+xx],al
xx=xx+40
endm
mov di,bp
sub di,40 ;on line above grid
mov ax,0 ;-1
stosw
stosw
stosb ;=5 characters
mov byte ptr es:[di],127
add di,40*9-5
stosw
stosw
stosb
mov byte ptr es:[di],127
mov di,bp
pop cx ;get count
pop ax ; then colour gone into ah
; need to set indiv blocks ,
mov al,11
cmp ah,(i_p+r_p)/256
jne label57
mov al,12
label57:
mov ah,al
mov al,2 ;write to planes
mov dx,3c4h
out dx,ax
mov bp,5
sub bp,cx ;this is number of colour blocks
mov cx,5 ;6 blocks wide
mov al,255 ;do the rest of the pixels
;cmp cx,bp
;jne yetanotherlabel
;mov ax,0e02h ;make it black man !
;out dx,ax
;mov al,255 ;er ?
;yetanotherlabel:
chblcklpv:
cmp cx,bp
jne anotherlabel
mov ax,0e02h ;make it black man !
out dx,ax
mov al,255 ;er ?
anotherlabel:
mov ah,byte ptr es:[di] ;set latches
stosb ;writes to correct bit plane
xx=39
rept 7
mov ah,byte ptr es:[di+xx] ;set latches
mov es:[di+xx],al
xx=xx+40
endm
loop chblcklpv
nocharv:
mov ax,0ff08h ;change the mask
mov dx,3c4h
out dx,ax
pop es
ret
INIT_DUMMYega:
push ds
push es
push bp
push bx
mov ax,seg dseg
mov ds,ax
mov ax,map_width
shl ax,1
shl ax,1
add ax,map_width
shl ax,1
mov map_width10,ax
les ax,dum_ptr
xor di,di
mov ax,di
mov cx,16384
rep stosw ;first blank the screen !
mov ax,window_topleft
sub ax,offset dummy_scrn
shr ax,1
sub ax,d_scrn_w*16+2
and ax,8191
mov di,ax
mov chite_topleft,ax
; mov di,8192-d_scrn_w*16-2
; mov chite_topleft,di
mov bx,posn_in_map
sub bx,2
sub bx,map_width
mov cx,12
next_idega:
push cx
push di
call disp_rowega
add bx,map_width
pop di
pop cx
add di,36*16
and di,8191
loop next_idega
pop bx
pop bp
pop es
pop ds
ret
;puts 17 chites on to a row pointed to by di
disp_rowega:
;rept 16
mov cx,16
ch_lp_a:
push cx
mov si,[bx]
cvert
add bx,2
push di
call put_chiteega
pop di
add di,2
and di,8191
pop cx
loop ch_lp_a
;endm
;this assembles into a LOT of code !!
; not any more !!
mov si,[bx]
cvert
call put_chiteega
sub bx,32 ;restore effect of 16 incrememnts
ret
disp_colega:
push bx
sub bx,map_width
rept 11
mov si,[bx]
cvert
add bx,map_width
push di
call put_chiteega
pop di
add di,d_scrn_w*16
and di,8191
endm
mov si,[bx]
cvert
call put_chiteega
pop bx
ret
SCROLL_Uega:
inc scrn_top
mov ax,window_topleft
add ax,8*d_scrn_w
sub ax,offset dummy_scrn
and ax,16383
add ax,offset dummy_scrn
mov window_topleft,ax
;add window_topleft,8*d_scrn_w ;oh eck !
;add window_top,4
;cmp window_top,176
;jl over_u1
;sub window_topleft,16384
;sub window_top,176
over_u1: add posn_in_chr,16
cmp posn_in_chr,64
jl u_n_sc
sub posn_in_chr,64
mov bx,posn_in_map
add bx,map_width
mov posn_in_map,bx
add bx,map_width10
mov di,chite_topleft
add di,d_scrn_w*16
and di,8191
mov chite_topleft,di
add di,d_scrn_w*16*11
and di,8191
sub bx,2
call disp_rowega
u_n_sc: mov scroll_flag,1
RET
scroll_dega: dec scrn_top
mov ax,window_topleft
sub ax,8*d_scrn_w
sub ax,offset dummy_scrn
and ax,16383
add ax,offset dummy_scrn
mov window_topleft,ax
;sub window_topleft,8*d_scrn_w ;oh eck !
;sub window_top,4
;JGE OVERD_1
;ADD WINDOW_TOPLEFT,16384 ;length of buffer
;add window_top,176
overd_1: sub posn_in_chr,16
jge no_u_chite
add posn_in_chr,64
sub chite_topleft,16*d_scrn_w;up a chite
and chite_topleft,8191
mov di,chite_topleft
mov bx,posn_in_map
sub bx,map_width
mov posn_in_map,bx
sub bx,2
sub bx,map_width
call disp_rowega
no_u_chite: mov scroll_flag,1
RET
scroll_rega:
dec scrn_left
mov ax,window_topleft
dec ax
sub ax,offset dummy_scrn
and ax,16383
add ax,offset dummy_scrn
mov window_topleft,ax
;dec window_topleft
;dec window_left
;jge over_sr1
;mov window_left,59
;dec window_top
;jge over_sr1
;mov window_topleft,offset dummy_scrn+16383
;mov window_top,175
over_sr1:
mov ax,window_topleft
sub ax,offset dummy_scrn
test ax,3
jnz n_l_c
mov di,chite_topleft
sub di,2
and di,8191
mov chite_topleft,di
sub posn_in_map,2
mov bx,posn_in_map
sub bx,2
call disp_colega
n_l_c:
mov scroll_flag,1
ret
scroll_lega:
inc scrn_left
push window_topleft
mov ax,window_topleft
inc ax
sub ax,offset dummy_scrn
and ax,16383
add ax,offset dummy_scrn
mov window_topleft,ax
;inc window_topleft
;inc window_left
;cmp window_left,60
;jl over_sl1
;mov window_left,0
;inc window_top
;cmp window_top,176
;jl over_sl1
;mov window_topleft,offset dummy_scrn
;mov window_top,0
over_sl1:
pop ax
test ax,3 ;every 4 bytes do a chite ?
;this is as screen is an assummed cga format ?
jnz no_lc
mov di,chite_topleft
add di,2 ;real address !
and di,8191
mov chite_topleft,di
add di,d_scrn_w-gap
and di,8191
mov bx,posn_in_map
add bx,30 ;15 characters to the right !
call disp_colega
add posn_in_map,2
no_lc:
mov scroll_flag,1
ret
; E.G.A download !
;flips screen downloading to.
; In order to lessen the flicker
;
;Even though scrolling is at 8 pixels
;being ega alignment is odd and even !
down_loadega:
push ds
push es
push bp
push bx
push dx
not flag
mov ax,0a000h
mov bx,32
cmp flag,0
jne as
mov ax,0a200h
mov bx,0
as: mov bscrn,ax
mov es,ax ;destin of altering screen
mov dx,3d4h
mov al,12
out dx,al
mov al,bl
inc dx
out dx,al
;ES pnts to write screen.displayed screen is also decided
;now download by doing each seperate bit plane
mov ax,5
mov dx,3ceh
out dx,ax ;write mode 0 move to screen
mov ax,window_topleft
sub ax,offset dummy_scrn
shr ax,1 ;scroll half as accurate as cga !!!
mov si,ax ;si=0-8192 = start of dummy !
lds ax,dum_ptr ;point ds to dummy scrn
mov bp,ds
mov dx,3dah
w_fly:
in al,dx
test al,8
jz w_fly ;may have to wait until not fly_back.
w_n_fly:
in al,dx
test al,8
jnz w_n_fly ;waiting for not flyback as well .
; is this source of problem??
;mov si,0 ;zero-ise the screen offset
push si
;mov word ptr ds:[8191],-1
write r_p
call a_plane
pop si
add bp,8192/16
mov ds,bp
push si
write g_p
;mov word ptr ds:[8191],-1
call a_plane
add bp,8192/16
mov ds,bp
pop si
push si
write b_p
;mov word ptr ds:[8191],-1
call a_plane
add bp,8192/16
mov ds,bp
pop si
write i_p
;mov word ptr ds:[8191],255
call a_plane
border 0
pop dx
pop bx
pop bp
pop es
pop ds
ret
a_plane:
;a simpler routine for the download !
mov di,40*20+5
mov dx,160
wrplp:
cmp si,8192-d_scrn_w
jae awrapl
mov cx,15
rep movsw
add si,gap
add di,40-30
dec dx
jne wrplp
ret
awrapl:
mov cx,30
sllp:
movsb
and si,8191
loop sllp
dec dx
jz rearlu
add di,40-30
add si,gap
and si,8191 ;i think its needed ?
wrplpx:
mov cx,15
rep movsw
add si,gap
and si,8191
add di,40-30
dec dx
jne wrplpx
rearlu:
ret
big_ega:
mov ax,0a000h
mov es,ax
mov ax,seg big_chars
mov ds,ax
mov al,dh
xor ah,ah
shl ax,1
shl ax,1
shl ax,1;*8
mov di,ax
shl ax,1;
shl ax,1;*32
xor dh,dh
add ax,dx ;2*x due 2 ega limitations !
add di,ax ;dest
mov ax,5
mov dx,3ceh
out dx,ax ;write mode 0 move to screen
ch_lpe:
lodsb ;load character
or al,al
jnz nuvchare
eofsh:
jmp eofchars
nuvchare:
; got a char !
; what is it ?
cmp al,255
jp_e time_vare
cmp al,32
jne norra_sp3
push si
mov si,offset sp_frigg
jmp space_here3
norra_sp3:
sub al,48
jc eofsh ;less than 48 ! ERROR
cmp al,9
ja eofsh ;more then 58 error
; alright then do a character
push si
xor ah,ah
shl ax,1
shl ax,1 ;*4
shl ax,1
shl ax,1
shl ax,1
shl ax,1 ;*64
mov si,offset big_chars
add si,ax
space_here3:
vv=0
qq=0
write r_p
rept 16
mov al,[si+qq]
mov es:[di+vv],al
mov es:[di+vv+2000h],al
vv=vv+40
qq=qq+4
endm
write g_p
vv=0
qq=1
rept 16
mov al,[si+qq]
mov es:[di+vv],al
mov es:[di+vv+2000H],al
vv=vv+40
qq=qq+4
endm
write b_p
vv=0
qq=2
rept 16
mov al,[si+qq]
mov es:[di+vv],al
mov es:[di+vv+2000H],al
vv=vv+40
qq=qq+4
endm
write i_p
vv=0
qq=3
rept 16
mov al,[si+qq]
mov es:[di+vv],al
mov es:[di+vv+2000H],al
vv=vv+40
qq=qq+4
endm
pop si
add di,1
jmp ch_lpe
a_planex:
push si
push di
push cx
mov cx,16
alp_1:
mov al,[si]
mov es:[di],al
mov es:[di+2000h],al
mov al,[si+4]
mov es:[di+1],al
mov es:[di+2000h+1],al
mov al,[si+8]
mov es:[di+2],al
mov es:[di+2000h+2],al
mov al,[si+12]
mov es:[di+3],al
mov es:[di+2000h+3],al
add si,16
add di,40
loop alp_1
pop cx
pop di
pop si
ret
time_vare:
push si
mov si,640+offset big_chars
write r_p
call a_planex
inc si
write g_p
call a_planex
inc si
write b_p
call a_planex
inc si
write i_p
call a_planex
inc si
pop si
ret
bgtan:
mov ax,0b800h
mov es,ax
mov al,dh ;y value
xor ah,ah
shr ax,1
shr ax,1 ; div 4
; *160 + 8192 * y and 3
;mov bh,dh
;and bx,3*256 ; y and 3 * 256
; must mul by 32 yet
shl ax,1 ;*2
mov bx,ax ;store *2
shl ax,1 ;*4 32 = 128/4
shl ax,1 ;*8
add ax,bx ; hmm now mul by er 32 *10
shl ax,1
shl ax,1
shl ax,1
shl ax,1 ; * 32 !
xor dh,dh ;clear out y address
shl dx,1
shl dx,1 ; * 4 er ? think so ?
mov di,dx
add di,ax ; destination.
ch_lpt:
lodsb ;load character
or al,al
jp_z eofchars
; got a char !
; what is it ?
cmp al,255
jp_e time_vart
cmp al,32
jne norra_sp2
push si
mov si,offset sp_frigg
jmp space_here2
norra_sp2:
sub al,48
jp_c eofchars ;less than 48 ! ERROR
cmp al,9
jp_a eofchars ;more then 58 error
; alright then do a character
push si
xor ah,ah
shl ax,1
shl ax,1 ;*4
shl ax,1
shl ax,1
shl ax,1
shl ax,1 ;*64 index character data.
mov si,offset big_chars
add si,ax
space_here2:
; NO ACCOUNT TAKEN OVER WHICH LINE STARTED ON
; MUST ALWAYS BE ON l mod 4 = 0 !!!!!!!!1!!!!!!!!!
rept 4
movsw
movsw
add di,8192-4
movsw
movsw
add di,8192-4
movsw
movsw
add di,8192-4
movsw
movsw