-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathint.asm
1207 lines (1026 loc) · 29.5 KB
/
int.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
; -----------------------------------------------------------------
; Implements a jump table to select various interrupt routines.
; Input:
; BP - offset to the function table
; AH - function number
; -----------------------------------------------------------------
INT_Dispatch:
push bx
mov bl, ah
xor bh, bh
shl bx, 1
add bp, bx
pop bx
call [cs:bp]
ret
INT_Unimplemented:
ret
; -----------------------------------------------------------------
; INT 10 - screen functions moved to screen.asm
; -----------------------------------------------------------------
; -----------------------------------------------------------------
; INT 11 - equipment list.
; -----------------------------------------------------------------
INT_11:
INT_Debug 11h
; Detect 8087 processor
call INT_11_CPU
and ax, 0001h
shl ax, 1
; 2 disk drives, MDA card, 64K+ memory, 1 serial port
add ax, 037Dh
iret
; -----------------------------------------------------------------
; Equipment flags.
; -----------------------------------------------------------------
EQUIPMENT_8087 equ 1
EQUIPMENT_V20 equ 2
INT_11_CPU:
push cx
push bx
; Test if 8087 present
fninit
mov cx, 3
INT_11_CPU_8087:
loop INT_11_CPU_8087
mov bx, sp
sub bx, 2
mov [ss:bx], ax
fnstcw [ss:bx]
cmp [ss:bx], word 03FFh
jne INT_11_CPU_No8087
mov cl, EQUIPMENT_8087
INT_11_CPU_No8087:
pop bx
pop cx
ret
db 60h ; PUSHA
stc
jnc INT_11_CPU_NoV20
db 61h ; POPA
or cl, EQUIPMENT_V20
INT_11_CPU_NoV20:
mov al, cl
pop bx
pop cx
ret
; -----------------------------------------------------------------
; INT 12 - memory size.
; -----------------------------------------------------------------
INT_12:
INT_Debug 12h
mov ax, (MemTop-40h)/64
iret
; -----------------------------------------------------------------
; INT 13 - disk functions.
; -----------------------------------------------------------------
INT_13:
INT_Debug 13h
cmp ah, 1Bh
ja INT_13_Ret
push bp
mov bp, INT_13_Functions
call INT_Dispatch
pop bp
retf 2
INT_13_Ret:
iret
INT_13_Functions:
dw INT_13_OK
dw INT_13_01
dw INT_13_02
dw INT_13_03
dw INT_13_OK
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
dw INT_13_08
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
dw INT_13_OK
dw INT_13_OK
dw INT_13_Error
dw INT_13_Error
dw INT_13_OK
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
dw INT_13_15
dw INT_13_16
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
dw INT_13_Error
INT_13_HD:
cmp dl, 080h
jne INT_13_HD_1
jmp SD_Handle
INT_13_HD_1:
ret
; -----------------------------------------------------------------
; INT 13 function 00 - reset drive.
; -----------------------------------------------------------------
INT_13_OK:
clc
ret
INT_13_Error:
stc
mov al, 02h
ret
; -----------------------------------------------------------------
; INT 13 function 01 - get status.
; -----------------------------------------------------------------
INT_13_01:
clc
xor al, al
ret
; -----------------------------------------------------------------
; INT 13 function 02 - disk read.
; INT 13 function 03 - disk write.
; -----------------------------------------------------------------
INT_13_02:
test dl, 80h
jnz INT_13_HD
INT_13_02_Floppy:
mov bp, 0
jmp INT_13_Common
INT_13_03:
test dl, 80h
jnz INT_13_HD
mov bp, 1
INT_13_Common:
push es
push cx
push ax
push ax
call INT_13_Logical
pop cx
xor ch, ch
INT_13_02_Loop:
call INT_13_Disk
jc INT_13_02_Error
inc ax
inc ch
cmp ch, cl
jne INT_13_02_Loop
INT_13_02_Break:
mov al, ch
xor ah, ah
INT_13_02_Ret:
pop cx
pop cx
pop es
ret
INT_13_02_Error:
mov al, ch
jmp INT_13_02_Ret
; -----------------------------------------------------------------
; Calculate logical sector number from PC geometry.
; Input:
; CL - physical sector number
; DH - physical head number
; CH - physical track number
; Output:
; AX - logical sector number
; -----------------------------------------------------------------
INT_13_Logical:
push bx
push ds
mov ax, Data_Segment
mov ds, ax
mov al, ch
xor ah, ah
mov bl, 2
mul bl
add al, dh
mov bl, 9
mul bl
mov bl, cl
dec bl
xor bh, bh
add ax, bx
pop ds
pop bx
ret
; -----------------------------------------------------------------
; Read or write PC sector
; Input:
; BP - 0 for disk read, 1 for disk write
; AX - 256-byte sector number
; DL - drive number
; ES:BX - buffer address
; -----------------------------------------------------------------
INT_13_Disk:
push cx
push ax
; Convert 512- to 256-byte sectors
push ds
mov cx, Data_Segment
mov ds, cx
mov cl, 2
xor ch, ch
push dx
mul cx
pop dx
pop ds
; Check if read across 64 kB boundary
push ax
push bx
mov ax, es
shl ax, 1
shl ax, 1
shl ax, 1
shl ax, 1
add ax, bx
test ax, ax
jz INT_13_Disk_Zero
xchg ax, bx
mov ax, 1
mul cl
xchg al, ah
add ax, bx
jc INT_13_Disk_DMA_Error
pop bx
pop ax
; Read physical sectors
INT_13_Disk_Loop:
push ax
call IPC_SectorCalc
call IPC_SectorAccess
cmp ax, 3030h
jz INT_13_Disk_NoError
pop ax
pop ax
pop cx
stc
mov ah, 2
ret
INT_13_Disk_NoError:
; Check if we were reading on the 0000 boundary
; If yes, move the sector 2 bytes below and restore overwritten word
test ch, 01h
jz INT_13_NotZero
push ds
push si
push di
mov di, es
mov ds, di
sub bx, 2
mov si, bx
mov di, bx
push cx
mov cx, 128
lodsw
rep movsw
pop cx
xor ch, ch
stosw
pop di
pop si
pop ds
INT_13_NotZero:
mov ax, es
add ax, 16
mov es, ax
pop ax
inc ax
loop INT_13_Disk_Loop
pop ax
pop cx
clc
ret
; Fake "read across 64 boundary" error
INT_13_Disk_DMA_Error:
pop bx
pop ax
pop ax
pop cx
stc
mov ah, 9
ret
; Read on 0000-aligned address: move the pointer +2 bytes
INT_13_Disk_Zero:
pop bx
; Remember the word that will be overwritten
mov ax, [es:bx+256]
cmp bp, 1
jne INT_13_Disk_NotWrite
; If writing, move the sector 2 bytes up
push ds
push si
push di
mov si, es
mov ds, si
mov si, bx
add si, 254
mov di, bx
add di, 256
std
push cx
mov cx, 128
rep movsw
pop cx
cld
pop di
pop si
pop ds
INT_13_Disk_NotWrite:
mov [es:bx], ax
add bx, 2
pop ax
mov ch, 01h
jmp INT_13_Disk_Loop
; -----------------------------------------------------------------
; INT 13 function 08 - get drive parameters.
; -----------------------------------------------------------------
INT_13_08:
test dl, 80h
jz INT_13_08_Floppy
jmp INT_13_HD
INT_13_08_Floppy:
clc
xor ah, ah
mov bl, 03h
mov cx, 5009h
mov dx, 0102h
mov di, INT_1E
push cs
pop es
ret
; -----------------------------------------------------------------
; INT 13 function 15 - get disk change type.
; -----------------------------------------------------------------
INT_13_15:
test dl, 80h
jz INT_13_15_Floppy
jmp INT_13_HD
INT_13_15_Floppy:
clc
mov ah, 01h
ret
; -----------------------------------------------------------------
; INT 13 function 16 - get disk change flag.
; -----------------------------------------------------------------
INT_13_16:
clc
mov ah, 01h
ret
; -----------------------------------------------------------------
; INT 14 - serial functions.
; -----------------------------------------------------------------
INT_14:
INT_Debug 14h
cmp ah, 03h
ja INT_14_Ret
push bp
mov bp, INT_14_Functions
call INT_Dispatch
pop bp
INT_14_Ret:
iret
INT_14_Functions:
dw INT_14_00
dw INT_14_01
dw INT_14_02
dw INT_14_03
; -----------------------------------------------------------------
; INT 14 function 00 - initialize serial port (unimplemented).
; -----------------------------------------------------------------
INT_14_00:
push ax
call IPC_SerialConvert
call IPC_SerialParams
pop ax
ret
; -----------------------------------------------------------------
; INT 14 function 01 - send character.
; -----------------------------------------------------------------
INT_14_01:
test dx, dx
jnz INT_14_NoPort
call IPC_SerialOut
xor ah, ah
ret
INT_14_NoPort:
ret
; -----------------------------------------------------------------
; INT 14 function 02 - receive character.
; -----------------------------------------------------------------
INT_14_02:
test dx, dx
jnz INT_14_NoPort
call IPC_SerialIn
xor ah, ah
ret
; -----------------------------------------------------------------
; INT 14 function 03 - get serial port status.
; -----------------------------------------------------------------
INT_14_03:
test dx, dx
jnz INT_14_NoPort
call IPC_SerialStatus
cmp al, 00h
mov ax, 6010h
jz INT_14_03_NoData
or ah, 01h
INT_14_03_NoData:
ret
; -----------------------------------------------------------------
; INT 15 - BIOS functions.
; -----------------------------------------------------------------
INT_15:
INT_Debug 15h
stc
sti
retf 2
; -----------------------------------------------------------------
; INT 16 - keyboard functions.
; -----------------------------------------------------------------
INT_16:
INT_Debug 16h
and ah, 0CFh ; Map 1x and 2x functions to 0x
cmp ah, 09h
je INT_16_09
cmp ah, 03h
ja INT_16_Ret
cli
push bp
mov bp, INT_16_Functions
call INT_Dispatch
pop bp
sti
retf 2 ; To retain the ZF flag!
INT_16_09:
xor al, al
INT_16_Ret:
iret
INT_16_Functions:
dw INT_16_00
dw INT_16_01
dw INT_16_02
dw INT_Unimplemented
; -----------------------------------------------------------------
; INT 16 function 00 - read from keyboard buffer.
; -----------------------------------------------------------------
INT_16_00:
call Screen_Interrupt
INT_16_00_Loop:
sti
nop
cli
; Get 6509 status
out 0E8h, al
in al, 21h
out 0E9h, al
test al, 01h
jnz INT_16_00_Loop
call IPC_KbdClear
push bx
mov bx, ax
call IPC_KbdConvert
push ds
push ax
mov ax, Data_Segment
mov ds, ax
test [Data_Boot], byte 80h
jz INT_16_00_NoBoot
; Get key scancode in AL
mov ax, bx
xor ah, ah
call IPC_KbdConvert
; Simulate keypress with INT 09
mov ax, Virtual_Segment
mov ds, ax
pop ax
push ax
mov [V_Port_60], al
int 09h
or [V_Port_60], byte 80h
int 09h
INT_16_00_NoBoot:
pop ax
pop ds
INT_16_00_Ret:
pop bx
ret
; -----------------------------------------------------------------
; INT 16 function 01 - peek into keyboard buffer.
; -----------------------------------------------------------------
INT_16_01:
call Screen_Interrupt
out 0E8h, al
in al, 21h
out 0E9h, al
; Fake INT 09 for Microsoft QBASIC
push ax
push ds
mov ax, Virtual_Segment
mov ds, ax
mov [V_Port_60], byte 0AAh ; Left Shift depressed
int 09h
pop ds
pop ax
test al, 01h
jnz INT_16_NoKey
call IPC_KbdPeek
jmp IPC_KbdConvert
INT_16_NoKey:
xor ax, ax
ret
; -----------------------------------------------------------------
; INT 16 function 02 - get shift key state.
; -----------------------------------------------------------------
INT_16_02:
out 0E8h, al
in al, 21h
out 0E9h, al
mov ah, al
; Store shift key state in BIOS data area for Turbo Pascal 7
INT_16_BIOSFlags:
xor al, al
test ah, 10h
jnz INT_16_BIOSFlags_NoShift
or al, 01h
INT_16_BIOSFlags_NoShift:
test ah, 20h
jnz INT_16_BIOSFlags_NoCtrl
or al, 04h
INT_16_BIOSFlags_NoCtrl:
test ah, 08h
jnz INT_16_BIOSFlags_NoAlt
or al, 08h
INT_16_BIOSFlags_NoAlt:
push bx
push ds
xor bx, bx
mov ds, bx
mov [0417h], al
pop ds
pop bx
mov ah, 02h
ret
; -----------------------------------------------------------------
; INT 17 - printer functions.
; -----------------------------------------------------------------
INT_17:
INT_Debug 17h
cmp ah, 02h
ja INT_17_Ret
push bp
mov bp, INT_17_Functions
call INT_Dispatch
pop bp
INT_17_Ret:
iret
INT_17_Functions:
dw INT_17_00
dw INT_17_01
dw INT_17_02
; -----------------------------------------------------------------
; INT 17 function 00 - output byte to printer.
; -----------------------------------------------------------------
INT_17_00:
call IPC_PrinterOut
ret
; -----------------------------------------------------------------
; INT 17 function 01 - initialize printer (unimplemented).
; -----------------------------------------------------------------
INT_17_01:
ret
; -----------------------------------------------------------------
; INT 17 function 02 - get printer status.
; -----------------------------------------------------------------
INT_17_02:
mov ah, 80h
ret
; -----------------------------------------------------------------
; INT 18 - ROM BASIC.
; -----------------------------------------------------------------
INT_18:
INT_Debug 18h
jmp INT_19_Again
; -----------------------------------------------------------------
; INT 19 - Reboot.
; -----------------------------------------------------------------
INT_19:
INT_Debug 19h
INT_19_Again:
push cs
pop ds
call Output_Line
mov si, INT_19_Banner1
call Output_String
INT_19_Loop:
call INT_16_00
cmp ah, 3Ch ; F2
jz INT_19_Floppy
cmp ah, 3Bh ; F1
jz INT_19_HD
cmp ah, 44h ; F10
jz Config_Modify
cmp ax, 02E03h ; Run/Stop
jz Config_Reset
jmp INT_19_Loop
; Try loading boot sector from hard disk
INT_19_HD:
call Output_Line
mov dx, 0080h
mov ax, 0201h
xor cx, cx
mov es, cx
inc cx
mov bx, 7C00h
call INT_13_02
jc INT_19_Error
cmp [es:7DFEh], word 0AA55h
jne INT_19_NoSystem
mov dl, 80h
jmp INT_19_Found
INT_19_Floppy:
call Output_Line
; Load two first 256-byte sectors from the floppy disk.
xor bx, bx
mov es, bx
mov bp, bx
mov bx, 7C00h
xor dl, dl
mov ax, 0001h
call IPC_SectorAccess
mov bx, 7D00h
mov ax, 0101h
call IPC_SectorAccess
cmp [es:7DFEh], word 0AA55h
jne INT_19_NoSystem
xor dl, dl
INT_19_Found:
push dx
call IPC_Init
; Jump to boot sector code.
call INT_19_Segments
mov si, INT_19_Banner2
call Output_String
mov [es:Data_Boot], byte 80h
pop dx
jmp 0000:7C00h
INT_19_NoSystem:
call INT_19_Segments
mov si, INT_19_Banner3
call Output_String
jmp INT_19_Again
INT_19_Segments:
mov ax, Data_Segment
mov es, ax
push cs
pop ds
ret
INT_19_Error:
call INT_19_Segments
mov si, INT_19_Banner4
call Output_String
jmp INT_19_Again
INT_19_Banner1:
db "Select an option:", 10, 13
db " F1 - Boot from SD card", 10, 13
db " F2 - Boot from floppy disk", 10, 13
db " F10 - Modify configuration", 10, 13
db " Run/Stop - Reset configuration", 10, 13
db 0
INT_19_Banner4:
db "SD card not found, please try again.", 10, 13, 0
INT_19_Banner2:
db "The system is coming up, please wait.", 10, 13, 0
INT_19_Banner3:
db "Insert a system disk and press any key.", 10, 13, 0
; -----------------------------------------------------------------
; INT 1A - Timer functions.
; -----------------------------------------------------------------
INT_1A:
INT_Debug 1Ah
test ah, ah
je INT_1A_00
cmp ah, 01
je INT_1A_01
cmp ah, 02
je INT_1A_02
cmp ah, 03
je INT_1A_03
cmp ah, 04
je INT_1A_04
cmp ah, 05
je INT_1A_05
stc
xor dx, dx
xor cx, cx
retf 2
; -----------------------------------------------------------------
; INT 1A function 00 - get system time.
; -----------------------------------------------------------------
INT_1A_00:
push ds
xor cx, cx
mov ds, cx
mov dx, [046Ch]
mov cx, [046Eh]
xor al, al
pop ds
clc
retf 2
; push ax
; push bx
; call INT_1A_02_Do
; mov al, dh
; call ConvertFromBCD
; mov ah, al ; AH = Seconds
; push ax
; mov al, cl
; call ConvertFromBCD
; mov dl, al ; DL = Minutes
; mov al, ch
; call ConvertFromBCD
; mov dh, al ; DH = Hours
; pop ax
; xor al, al ; AL = Microseconds
; Calculate number of ticks in whole minutes
; mov bx, ax
; mov al, dh
; mov cl, 60
; mul cl
; xor dh, dh
; add ax, dx
; mov cx, 1092 ; Ticks per minute
; mul cx
; push dx
; push ax
; Calculate number of ticks in seconds
; mov al, bh
; mov cl, 10
; mul cl
; xor bh, bh
; add ax, bx
; mov cx, 182
; mul cx
; mov cx, 100
; div cx
; Add them together
; pop cx
; add cx, ax
; pop dx
; xor ax, ax
; adc dx, ax
; pop bx
; pop ax
; xor al, al
; xchg cx, dx
; iret
; -----------------------------------------------------------------
; INT 1A function 01 - set system time.
; -----------------------------------------------------------------
INT_1A_01:
push ax
push ds
xor ax, ax
mov ds, ax
mov [046Ch], dx
mov [046Eh], cx
pop ds
pop ax
clc
retf 2
; push ax
; push bx
; push cx
; push dx
; mov ax, dx
; mov dx, cx
; Calculate hour and minute
; mov cx, 1092 ; Ticks per minute
; div cx
; mov bx, dx
; mov cl, 60
; div cl
; xchg al, ah
; Calculate number of seconds
; xchg ax, bx
; xor dx, dx
; mov cx, 50
; mul cx
; mov cx, 91
; div cx
; mov cl, 10
; div cl
; xchg al, ah
; mov dx, bx
; push ax
; mov al, dh
; call ConvertToBCD
; mov ch, al
; mov al, dl
; call ConvertToBCD
; mov cl, al
; pop ax
; mov al, ah
; call ConvertToBCD
; mov dh, al
; call INT_1A_03_Do
; pop dx
; pop cx
; pop bx
; pop ax
; iret
; -----------------------------------------------------------------
; INT 1A function 02 - get RTC time.
; -----------------------------------------------------------------
INT_1A_02:
call INT_1A_02_Do
retf 2
INT_1A_02_Do:
push ax
call I2C_Start
; RTC adress + write flag
mov al, 0D0h
call I2C_Send
jnc INT_1A_02_Do2
call I2C_Stop
pop ax
stc
ret
INT_1A_02_Do2:
; Read start address
mov al, 00h
call I2C_Send
call I2C_Start
; RTC adress + read flag
mov al, 0D1h
call I2C_Send
; Read address 00 (seconds)
clc
call I2C_Receive
and al, 7Fh
mov dh, al