[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to work out how to support non-MLI smartport calls



On Friday, 29 June 2012 05:04:19 UTC+10, Antoine Vignau  wrote:
 
> Oops, not!
> 
> You first have to find a smartport signature by examining three bytes then you add 3 to the value of $CxFF (e.g. $C5FF = $0A) => the entry point of the smartport routines of the 3.5" disk is $C50D ($C50A + 3)
> 
> You do not pass parameter through the stack (you do not push them) but, similar to the MLI one, the structure of a call is :
>  JSR spENTRYPOINT
>  DFB $command
>  DA ptrToCommandTable
> 
>  sta errorCode
>  bcc/bcs OK/KO

Yep. The basic structure is similar to an MLI call, but because SmartPort parameter blocks/command tables can be quite large, you have to 'inline' a pointer to the block rather than the parameters themselves.