Mercurial > hg > Members > kono > nitros9-code
view level2/modules/kernel/fdatlog.asm @ 1624:bb75784a1ec5
Minor source change by Rodney H.
author | boisy |
---|---|
date | Wed, 30 Jun 2004 01:07:36 +0000 |
parents | 1da8ab9ba433 |
children | 039ddb7c8ad7 |
line wrap: on
line source
************************************************** * System Call: F$DATLog * * Function: Convert DAT block/offset to logical address * * Input: B = DAT image offset * X = Block offset * * Output: X = Logical address * * Error: CC = C bit set; B = error code * FDATLog ldb R$B,u Get logical Block # ldx R$X,u Get offset into block bsr CmpLBlk Go modify X to be Logical address stx R$X,u Save in callers X register clrb No error & return rts * Compute logical address given B=Logical Block # & X=offset into block * Exits with B being logical block & X=logical address CmpLBlk pshs b Preserve logical block # tfr b,a Move log. block # to A lsla Multiply logical block by 32 lsla lsla lsla lsla clrb D=8k offset value IFNE H6309 addr d,x X=logical address in 64k workspace ELSE leax d,x ENDC puls b,pc Restore A, block # & return