From 98cab31fc3659e33aef260efca55bf9f1753164c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 11 Feb 2019 11:49:19 +0100 Subject: Add source files from Michael --- system/shard-x86-at/7/src/CLOCK.ASM | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 system/shard-x86-at/7/src/CLOCK.ASM (limited to 'system/shard-x86-at/7/src/CLOCK.ASM') diff --git a/system/shard-x86-at/7/src/CLOCK.ASM b/system/shard-x86-at/7/src/CLOCK.ASM new file mode 100644 index 0000000..b70f18e --- /dev/null +++ b/system/shard-x86-at/7/src/CLOCK.ASM @@ -0,0 +1,56 @@ +;**************************************************************************** +;*======= Copyright (C) 1985,86 Martin Schoenbeck, Spenge ==================* +;* * +;* Lesen der Echtzeituhr des IBM PC-AT * +;* Schreiben dummy routine * +;* Aufruf: blockin/blockout mit code -4 ueber kanal 32 * +;* Puffer: ROW 7 INT VAR * +;* * +;**************************************************************************** + +clockread: + call hardware + cmp al,IBMat ;haben wir den IBM PC-AT + jnz no_clock + mov ah,4 ;read date + int 1ah + jc no_clock + mov al,ch ;jahrhundert + call putbcd ;ueber bx wegschreiben + mov al,cl ;jahr + call putbcd + mov al,dh ;monat + call putbcd + mov al,dl ;tag + call putbcd + mov ah,2 ;read time + int 1ah + jc no_clock + mov al,ch ;stunden + call putbcd + mov al,cl ;minuten + call putbcd + mov al,dh ;sekunden + call putbcd + mov cx,0 ;keine fehler + ret + +no_clock: + mov cx,-1 ;geht nicht + ret + +clockwrite: + mov cx,-1 + ret + +putbcd: + mov ah,al + and ah,0fh ;in al niedrige nibble behalten + ib shr al,4 ;rueberschieben + or ax,3030h ;ziffern draus machen + mov word ptr es:[bx],ax ;eintragen + inc bx + inc bx ;zum naechsten + ret + + \ No newline at end of file -- cgit v1.2.3