This trap fetches a channel name. SQMS Only.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $06 | D0.L | Error code. |
D2.W | Maximum length of string | D2.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | Pointer to buffer | A1.L | Preserved. |
ERR_NO | Channel not open. |
ERR_BP | Bad parameter. |
ERR_NI | Not implemented. |
This shows a channel name being set in a buffer.
; A0 contains the channel ID get_name lea ans,a1 ; ans will hold the name moveq #43,d2 ; Must be greater than 42 moveq #$06,d0 ; IOA_CNAM trap #2 ; Fetch the name tst.l d0 ; OK? . . bra oops ; . . no! ; Now the name should be in "ans" as a QDOS string. ans ds.b 43