Jump to content

DosMonWrite: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
This call moves a filtered data record from the monitor's private data area into the monitor's output buffer.
This call moves a filtered data record from the monitor's private data area into the monitor's output buffer.


Line 6: Line 5:


==Parameters==
==Parameters==
; BufferO (PBYTE) - input : Address of the monitor output buffer.  
;BufferO (PBYTE) - input: Address of the monitor output buffer.
; DataBuffer (PBYTE) - input : Address of the monitor's private data area that contains a filtered data record of length Bytecnt. DosMonWrite moves this filtered data record into the monitor's output buffer.  
;DataBuffer (PBYTE) - input: Address of the monitor's private data area that contains a filtered data record of length Bytecnt. DosMonWrite moves this filtered data record into the monitor's output buffer.
; Bytecnt (USHORT) - input : Number of bytes in the data record.
;Bytecnt (USHORT) - input: Number of bytes in the data record.


==Return Code==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
 
*0 - NO_ERROR
Return code descriptions are:
*8 - ERROR_NOT_ENOUGH_MEMORY
* 0 - NO_ERROR  
*379 - ERROR_MON_INVALID_PARMS
* 8 - ERROR_NOT_ENOUGH_MEMORY  
*384 - ERROR_MON_DATA_TOO_LARGE
* 379 - ERROR_MON_INVALID_PARMS  
* 384 - ERROR_MON_DATA_TOO_LARGE


==Remarks==
==Remarks==
For a detailed description of the use of this call see the chapter "Character Device Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1.  
For a detailed description of the use of this call see the chapter "Character Device Monitors" in the ''IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1''.
 
==Example Code==
=== C Binding===
<PRE>
#define INCL_DOSMONITORS
 
USHORT  rc = DosMonWrite(BufferO, DataBuffer, Bytecnt);
 
PBYTE            BufferO;      /* Monitor output buffer */
PBYTE            DataBuffer;    /* Buffer from which records are taken */
USHORT          Bytecnt;      /* Number of bytes */
 
USHORT          rc;            /* return code */
</PRE>
 
===MASM Binding===
<PRE>
EXTRN  DosMonWrite:FAR
INCL_DOSMONITORS    EQU 1


PUSH@ OTHER   BufferO      ;Monitor output buffer
==Bindings==
PUSH@ OTHER   DataBuffer    ;Buffer from which records are taken
===C===
PUSH  WORD    Bytecnt      ;Number of bytes
<code>
CALL  DosMonWrite
#define INCL_DOSMONITORS
USHORT  rc = DosMonWrite(BufferO, DataBuffer, Bytecnt);
  PBYTE   BufferO;       /* Monitor output buffer */
  PBYTE   DataBuffer;   /* Buffer from which records are taken */
USHORT  Bytecnt;       /* Number of bytes */
USHORT  rc;            /* return code */
</code>


Returns WORD
===MASM===
</PRE>
<code>
EXTRN  DosMonWrite:FAR
INCL_DOSMONITORS    EQU 1
PUSH@  OTHER  BufferO    ;Monitor output buffer
PUSH@  OTHER  DataBuffer ;Buffer from which records are taken
PUSH  WORD    Bytecnt    ;Number of bytes
CALL  DosMonWrite
Returns WORD
</code>


[[Category:Dos]]
[[Category:Dos16]]

Latest revision as of 04:57, 26 January 2020

This call moves a filtered data record from the monitor's private data area into the monitor's output buffer.

Syntax

DosMonWrite (BufferO, DataBuffer, Bytecnt)

Parameters

BufferO (PBYTE) - input
Address of the monitor output buffer.
DataBuffer (PBYTE) - input
Address of the monitor's private data area that contains a filtered data record of length Bytecnt. DosMonWrite moves this filtered data record into the monitor's output buffer.
Bytecnt (USHORT) - input
Number of bytes in the data record.

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 0 - NO_ERROR
  • 8 - ERROR_NOT_ENOUGH_MEMORY
  • 379 - ERROR_MON_INVALID_PARMS
  • 384 - ERROR_MON_DATA_TOO_LARGE

Remarks

For a detailed description of the use of this call see the chapter "Character Device Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And Device Support Volume 1.

Bindings

C

#define INCL_DOSMONITORS
USHORT  rc = DosMonWrite(BufferO, DataBuffer, Bytecnt);
PBYTE   BufferO;       /* Monitor output buffer */
PBYTE   DataBuffer;    /* Buffer from which records are taken */
USHORT  Bytecnt;       /* Number of bytes */

USHORT  rc;            /* return code */

MASM

EXTRN  DosMonWrite:FAR
INCL_DOSMONITORS    EQU 1

PUSH@  OTHER   BufferO    ;Monitor output buffer
PUSH@  OTHER   DataBuffer ;Buffer from which records are taken
PUSH   WORD    Bytecnt    ;Number of bytes
CALL   DosMonWrite

Returns WORD