home *** CD-ROM | disk | FTP | other *** search
| RISC OS BBC BASIC V Source | 1993-06-19 | 1.2 KB | 40 lines |
- >MakeUtil
- Basic assemble Utility shell
-
- Cy Booker 1991, 1992, 1993
- ' Note that on Utility entry:
- < R0 = pointer to command line (i.e. name of file)
- I R1 = pointer to command tail (i.e. first parameter / control)
- 9 R12 = pointer to start of 1024 byte workspace
- 7 R13 = pointer to end of 1024 byte workspace
- 2 R14 = return address, with PSR_V clear
- 6 Processor is in
- mode, interrupts enabled
- > You can call other utilities from within utilities
- # You MUST
- call OS_Exit
- _Make_Utility(u$)
- _Make_Named_Utility(u$, u$)
- _Make_Named_Utility(u$, name$)
- _Make_Code(u$, name$, &FFC)
- _Make_Code(u$, name$, filetype%)
- L%, O%, P%, pass%
- L% = code% + code_size%
- pass% = %1100
- %1110
- P% = 0
- O% = code%
- " P% =
- ("FN_assemble_"+ u$)
- (pass%
- 2)= 0
- !
- P%= code%
- O%-1
- !P%=&CBCBCBCB
-
- $
- pass%
- "OS_File", 10, "<Library$Dir>."+ name$, filetype%,, code%, O%
- "Made utility `"+ name$+ "' size: "; O%-code%
-