home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / desktop / a / appensure / Source / MakeUtil (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1993-06-19  |  1.2 KB  |  40 lines

  1.   >MakeUtil
  2.      Basic assemble Utility shell
  3.      
  4.  Cy Booker 1991, 1992, 1993
  5. '        Note that on Utility entry:
  6. <        R0 = pointer to command line (i.e. name of file)
  7. I        R1 = pointer to command tail (i.e. first parameter / control)
  8. 9        R12 = pointer to start of 1024 byte workspace
  9.     7        R13 = pointer to end of 1024 byte workspace
  10. 2        R14 = return address, with PSR_V clear
  11. 6        Processor is in 
  12.  mode, interrupts enabled
  13. >        You can call other utilities from within utilities
  14. #        You MUST 
  15.  call OS_Exit
  16. _Make_Utility(u$)
  17. _Make_Named_Utility(u$, u$)
  18. _Make_Named_Utility(u$, name$)
  19. _Make_Code(u$, name$, &FFC)
  20. _Make_Code(u$, name$, filetype%)
  21.  L%, O%, P%, pass%
  22.   L% = code% + code_size%
  23.  pass% = %1100 
  24.  %1110 
  25.     P% = 0
  26.     O% = code%
  27. "    P% = 
  28. ("FN_assemble_"+ u$)
  29.  (pass% 
  30.  2)= 0 
  31. !       
  32.  P%= code% 
  33.  O%-1 
  34.         !P%=&CBCBCBCB
  35.       
  36. $        
  37.  pass%
  38.  "OS_File", 10, "<Library$Dir>."+ name$, filetype%,, code%, O%
  39. "Made utility `"+ name$+ "' size: "; O%-code%
  40.