; programm  : treiber.asm   version 1.00      23.09.1988
; syntax    : a86   pd
; aufgabe   : konverter fr druckerausgabe
; aufruf    : wird durch aufruf resident istalliert
;           : in der tabelle mssen die zu „ndernden zeichen eingetragen
;           : werden

           jmp        anfang
zeichen:   db 00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15
           db 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
           db 31,32,33,34,35,36,37,38,39,40,41,42,43,44,45
           db 46,47,48,49,50,51,52,53,54,55,56,57,58,59,60
           db 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80
           db 81,82,83,84,85,86,87,88,89,90
           db 91,92,93,94,95,96,97,98,99,100
           db 101,102,103,104,105,106,107,108,109,110
           db 111,112,113,114,115,116,117,118,119,120
           db 121,122,123,124,125,126,127,128,129,130
           db 131,132,133,134,135,136,137,138,139,140
           db 141,142,143,144,145,146,147,148,149,150
           db 151,152,153,154,155,156,157,158,159,160
           db 161,162,163,164,165,166,167,168,169,170
           db 171,172,173,174,175,176,177,178,179,180
           db 181,182,183,184,185,186,187,188,189,190
           db 191,192,193,194,195,196,197,198,199,200
           db 201,202,203,204,205,206,207,208,209,210
           db 211,212,213,214,215,216,217,218,219,220
           db 221,222,223,224,225,226,227,228,229,230
           db 231,232,233,234,235,236,237,238,239,240
           db 241,242,243,244,245,246,247,248,249,250
           db 251,252,253,254,255

rom_bios   label far
rom_off    dw ?
rom_seg    dw ?
kennung    db 'TREIBER'
treib:
           or ah,ah
           jnz bios
           push ds
           push bx
           mov bx,cs
           mov ds,bx
           mov bx,offset zeichen
           xlat
           pop bx
           pop ds
           cs:
bios:      jmp dword ptr rom_bios
anfang:    mov ax,0
           mov es,ax
           mov di,05c
           mov ax,es:[di]
           mov rom_off,ax
           mov ax,es:[di+2]
           mov rom_seg,ax
           mov es,ax
           mov di,offset rom_off
           add di,4
           mov si,offset kennung
           mov cx,04
           repe cmpsb
           jne install
           mov ah,09
           mov dx,offset schon_da
           int 021
           mov ah,04c
           int 021
install:   mov ax,0
           mov es,ax
           mov di,05c
           cli
           mov es:w[di],treib
           mov es:[di+2],cs
           sti
           mov ah,09
           mov dx,offset geklappt
           int 021
           mov dx,offset anfang
           int 027

schon_da   db 'bereits instaliert$'
geklappt   db 'alles ok $'

