(My) fork of 8086 Assembler for DOS (Announce)
> missing features (so far):
> - no ORG directive (so no device driver development possible?)
With some "handcrafting" I was able to rebuild my little PAUSE.SYS using ASM.COM
. Just rename generated PAUSE.COM to PAUSE.SYS. Of course, it's no fun to recalc offsets, e.g., for pausemsg
, if you make changes to the code.
; ****************************************************************************
; `PAUSE' - Source code for `pause' object
; Written by Robert Riebisch
; Converted to 8086 Assembler syntax by Robert Riebisch
;
; Copyright (c) 1997-2020 BTTR Software. All rights reserved.
;
; This program is free software; you can redistribute it and/or modify it
; under the terms of the `MODIFIED' BSD LICENSE. Please see `legal.txt'
; for details.
; ****************************************************************************
; device driver header
devdrvrhdr:
dw 0ffffh,0ffffh
dw 0 ; device attributes (block device)
dw 22 ; strategy routine offset _@strat
dw 33 ; interrupt routine offset _@intr
db 1 ; # of units
db 0,0,0,0,0,0,0 ; (reserved)
reqhdrptr: dw 0,0 ; pointer to request header
; strategy routine
_@strat:
cs:
mov [reqhdrptr-100h],bx ; save pointer to request header
cs: ; `-100h' = workaround unsupported `org'
mov [reqhdrptr+2-100h],es
retf
; interrupt routine
_@intr:
push ax ; save affected registers
push bx
push dx
push ds
pushf
; clear keyboard buffer
_@nextkey:
mov ah,1 ; check for keystroke
int 16h
jz _@empty
xor ah,ah ; get keystroke
int 16h
jmp _@nextkey
_@empty:
push cs ; make local data (`pausemsg')
pop ds ; addressable by setting DS = CS
mov dx,90 ; print pause message
; or use:
; mov dx,pausemsg ; print pause message
; sub dx,100h ; workaround unsupported `org' pseudo-op
mov ah,9
int 21h
xor ah,ah ; wait for keystroke
int 16h
; get removed from RAM by signaling an error
; `lds bx, [reqhdrptr]' encoded
db 0c5h,1eh,12h,0 ; point DS:BX to request header
mov word ptr [bx+3],8103h ; status = `Error', `Done', `Unknown command'
; above line might not be enough
mov byte ptr [bx+13],0 ; # of units
mov word ptr [bx+14],0 ; break address = CS:0 (for max. compatibility
mov [bx+16],cs ; with, e.g., old FreeDOS kernels, PTS-DOS 2000 or
; PTS-DOS 32)
popf ; restore affected registers
pop ds
pop dx
pop bx
pop ax
retf
pausemsg: db 'Press any key to continue...',13,10,'$'
; (end of `pause.asm')
---
Forum admin
Complete thread:
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 01:01 (Announce)
- (My) fork of 8086 Assembler for DOS - DosWorld, 26.12.2020, 16:01
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 16:31
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 17:25
- (My) fork of 8086 Assembler for DOS - RayeR, 26.12.2020, 22:48
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 00:03
- (My) fork of 8086 Assembler for DOS - RayeR, 27.12.2020, 03:57
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 22:11
- (My) fork of 8086 Assembler for DOS - RayeR, 28.12.2020, 01:09
- (My) fork of 8086 Assembler for DOS - DosWorld, 28.12.2020, 14:00
- (My) fork of 8086 Assembler for DOS - RayeR, 30.12.2020, 05:18
- (My) fork of 8086 Assembler for DOS - DosWorld, 28.12.2020, 14:00
- (My) fork of 8086 Assembler for DOS - RayeR, 28.12.2020, 01:09
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 22:11
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 08:49
- (My) fork of 8086 Assembler for DOS - marcov, 29.12.2020, 19:14
- (My) fork of 8086 Assembler for DOS - RayeR, 27.12.2020, 03:57
- (My) fork of 8086 Assembler for DOS - DosWorld, 27.12.2020, 00:03
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 17:18
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 17:33
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 18:14
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 23:26
- (My) fork of 8086 Assembler for DOS - Japheth, 26.12.2020, 18:14
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 23:22
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 13:22
- (My) fork of 8086 Assembler for DOS - rr, 26.12.2020, 17:33
- ASM's symbol handling needs work - Japheth, 26.12.2020, 19:18
- ASM's symbol handling needs work - rr, 26.12.2020, 19:23
- ASM's symbol handling needs work - rr, 26.12.2020, 23:22
- (My) fork of 8086 Assembler for DOS - rr, 27.12.2020, 01:05
- (My) fork of 8086 Assembler for DOS - rr, 29.12.2020, 01:55
- (My) fork of 8086 Assembler for DOS - rr, 02.03.2022, 21:54
- (My) fork of 8086 Assembler for DOS - DosWorld, 26.12.2020, 16:01