Re: A86: linking w/ the 82
[Prev][Next][Index][Thread]
Re: A86: linking w/ the 82
It appears that some are. I don't understand how they were, but these are
the link port routines from the Vertigo source code. From what I remember,
the byte to send/receive is in A, and the carry flag is set if there is an
error. If someone wants to document these, that'd be awsome:
(note: if you've ever seen the Vertigo source code, you'll know know it's
full of #ifdef's, #define's and #endif's, so I might have cut the wrong
code, left some out, etc...)
TryReceiveByte:
in a,(LINKPORT)
scf
ret z
ReceiveByteCont:
push bc
ld b,_ASAP_RECCONT
jr DoLink
ReceiveByte:
push bc
ld b,_ASAP_RECEIVE
jr DoLink
SendByte:
push bc
ld b,_ASAP_SEND
DoLink:
push de
push hl
ld hl,_ASAP_IND
ld (hl),b
ld hl,LinkErrorHandler
call _setErrorHand
set 2,(iy+12h)
call _linkExec
ld h,a
call _clearErrorHand
or 1 ;clear cf
.org $-1
LinkErrorHandler:
scf
DoneLink:
res 2,(iy+12h) ;error handler resets this anyway
ld a,h
pop hl
pop de
pop bc
ret
_setErrorHand =41A1h
_clearErrorHand =41A4h
_ASAP_SEND =0Ah
_ASAP_RECCONT =14h
_ASAP_RECEIVE =15h
_linkExec =571Ch
LINKPORT =7
>The protocol is documented, but there aren't any known ROM calls, or are
>there?