Store the label names unmangled and match those against command_line.
- Sebastian
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
rep stosw
call pc_getline
mov di,VKernelBuf+vk_vname
- call mangle_name ; Mangle virtual name
+ mov cx,FILENAME_MAX-1
+.loop:
+ lodsb
+ cmp al,' '
+ jna .done
+ mov [di],al
+ inc di
+ dec cx
+ jnz .loop
+.done:
mov byte [VKernel],1 ; We've seen a "label" statement
mov si,VKernelBuf+vk_vname ; By default, rname == vname
mov di,VKernelBuf+vk_rname
sub di,cx ; Return to beginning of buf
push si
- mov si,KernelName
+ mov si,command_line
mov cx,FILENAME_MAX
- es repe cmpsb
+.loop:
+ dec cx
+ jz .done
+ lodsb
+ mov ah,[di]
+ inc di
+ cmp ah,al
+ je .match
+ jmp .nomatch
+.match:
+ cmp al,' '
+ jna .done
+ jmp .loop
+.nomatch:
pop si
- je .found
jmp .scan
+.done:
+ pop si
;
; We *are* using a "virtual kernel"