Defeated 16-bit, we can now load the kernel by path
This commit is contained in:
1 parent
ec61cd8b8a
commit
a6a338c17a
11 files changed
+6065
-1049
No files matched your search
@@ -165,6 +165,64 @@ int num_bytes;
|
||||
#endasm
|
||||
}
|
||||
|
||||
int strcmp(source_1, source_2)
|
||||
char* source_1;
|
||||
char* source_2;
|
||||
{
|
||||
int i;
|
||||
int count;
|
||||
|
||||
count = strlen(source_1, 0x7e0);
|
||||
if (count != strlen(source_2, 0x7e0))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if(source_1[i] != source_2[i])
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
/*
|
||||
#asm
|
||||
#define DESTINATION 4[bp];
|
||||
#define DESTINATION_SEGMENT 6[bp];
|
||||
#define SOURCE 8[bp];
|
||||
#define SOURCE_SEGMENT 10[bp];
|
||||
; Compares two strings
|
||||
; IN si: the first (zero terminated) string
|
||||
; IN di: the second (zero terminated) string
|
||||
; OUT SF and ZF (same semantics as cmp)
|
||||
strcmp_stringcompare:
|
||||
push bx
|
||||
push si
|
||||
push di
|
||||
.strcmp_loop:
|
||||
mov bl, [si]
|
||||
mov bh, [di]
|
||||
cmp bl, bh
|
||||
jne .strcmp_end
|
||||
test bl, bl ; bl and bh are the same, so bl = 0 => dl = 0
|
||||
jz .strcmp_end
|
||||
inc si
|
||||
inc di
|
||||
jmp .strcmp_loop
|
||||
.strcmp_end:
|
||||
pop di
|
||||
pop si
|
||||
pop bx
|
||||
|
||||
ret
|
||||
|
||||
#endasm
|
||||
*/
|
||||
}
|
||||
|
||||
String_Array *string_split_c(string, delim, keep_delim)
|
||||
char *string;
|
||||
char delim;
|
||||
|
||||
Reference in new issue
Block a user