2 .define begdat,begbss,hol0,argv,envp,_RegHp,_incptflag
3 .define _Lineno,_Filna,_IgnoreMask,_TrpReg
21 ! the next 2 lines are OS specific:
23 SUB R12, R1, #8 ! Get end of ram
24 ! R0 points to command string
25 ! (argv,argc) code for C
26 ! or Pascal file names
27 MOV R9,R0 ! save pt in R0
28 MOV R8,#0 ! string length
34 MOV R7,R8 ! save len in R7
35 ! round up to multiple of 4
40 SUB R12,R12,R8 ! word aligned
42 ! OS intercepts blank lines, so
43 ! there must be at least one arg
45 MOV R6,#0 ! holds argc
46 MOV R5,#0 ! char count
53 BEQ loop1 !skip spaces
54 ADD R6,R6,#1 ! new arg
79 MOV R4, #0 ! zero terminator
81 ! create space on the stack for
82 ! the pointers to individual args
83 MOV R11, R12 ! string pt
86 ! save pointer to argv[0]
89 ! determine argv[0] .. argv[argc-1]
91 ! R11 = start of string
95 MOV R9, #0 !char count
107 SUB R4,R5,#1 !compensate for incr
108 STR R4,[R12,R8,LSL #2]
120 ! finally, replace spaces by 0
122 MOV R5,R11 !string ptr
123 MOV R6,R7 !string length