view level2/modules/kernel/fgmoddr.asm @ 2758:e4a0f58a5f9b

Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded. To fix this the code needed to set the envirornment variable that is in the rules.mak is now in the makefile(s) right before the include for the rules.mak file. This should fix the problem for those who do not have the NITROS9DIR envirornment variable preset.
author drencor-xeen
date Mon, 14 Jan 2013 14:37:46 -0600
parents 1da8ab9ba433
children 039ddb7c8ad7
line wrap: on
line source

**************************************************
* System Call: F$GModDr
*
* Function: Get copy of module directory
*
* Input:  X = 2048 byte buffer pointer
*
* Output: None
*
* Error:  CC = C bit set; B = error code
*
FGModDr  ldd   <D.ModDir+2 Get end ptr of module directory
         subd  <D.ModDir   Calculate maximum size of module directory
         tfr   d,y         Put max. size in Y
         ldd   <D.ModEnd   Get real end ptr of module dir
         subd  <D.ModDir   Calculate real size of module dir
         ldx   R$X,u       Get requested buffer ptr to put it from caller
         IFNE  H6309
         addr  d,x         Calculate end addr. of directory after its copied
         ELSE
         leax  d,x
         ENDC
         stx   R$Y,u       Preserve in caller's Y register
         ldx   <D.ModDir   Get start ptr of module directory
         stx   R$U,u       Preserve in caller's U register

         lda   <D.SysTsk   Get system task #
         ldx   <D.Proc     Get current process task #
         ldb   P$Task,x
         ldx   <D.ModDir   Get start ptr of module directory
         bra   L0978      --- saves 4 bytes, adds 3 cycles
***         ldu   R$X,u       Get caller's buffer ptr
***         os9   F$Move      Copy module directory in caller's buffer
***         rts