QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools


qdosmsq:traps:trap_1:comm

Table of Contents

MT_BAUD/SMS_COMM

This trap sets the baud rate.

Call ParametersReturn Parameters
D0.B$12D0.LError code.
D1.W Baud rate. D1.LCorrupted.

Errors

ERR_BPNot a valid baud rate.

Notes

  • All registers not shown above are not used on entry and are preserved on exit.

Example

The example below shows the use of this trap call to set a baud rate of 9,600.

Baud    moveq   #$12,d0         ; MT_BAUD.
        move.w  #9600,d1        ; Required baud rate.
        trap    #1              ; Set it.
        tst.l   d0              ; OK?
        beq.s   baud_ok         ; Yes.
        ...                     ; No, handle errors here.
qdosmsq/traps/trap_1/comm.txt · Last modified: 2017/09/09 23:21 by norman