Displaying 9 results from an estimated 9 matches for "cs_intcall".
Did you mean:
__intcall
2003 Sep 15
2
Can not use read file SYSLINUX API call
...t ax,cx,dx,es,si,di,t;
com32sys_t inreg,outreg;
memset(&inreg, 0, sizeof inreg);
memset(&outreg, 0, sizeof outreg);
strcopy(__com32.cs_bounce, "test.txt");
inreg.eax.w[0] = 0x0006; // Open file
inreg.esi.w[0] = OFFS(__com32.cs_bounce);
inreg.es = SEG(__com32.cs_bounce);
__com32.cs_intcall(0x22, &inreg, &outreg);
si = outreg.esi.w[0];
cx = outreg.ecx.w[0];
ax = outreg.eax.w[0];
if ((ax % cx) == 0)
t = ax / cx;
else
t = (ax / cx) + 1;
memset(&inreg, 0, sizeof inreg);
inreg.esi.w[0] = si;
inreg.ecx.w[0] = t;
inreg.eax.w[0] = 0x0007; // Read file
inreg.ebx.w[0] = OFFS(__c...
2013 Feb 06
1
Syslinux-5.01 cmd.c32 broken: __com32 undefined
Rather than acting like a typical C program using argc/argv, cmd.c32
uses __com32.cs_cmdline to retrieve what's passed to it. meminfo.c32
uses __intcall() which in the library calls __com32.cs_intcall(). Is
__com32 only exposed for library functions or is there something else
missing in here? Should accessing __com32.cs_cmdline be abstracted
via a function call for protection? Should cmd.c32 use argc/argv
instead?
If we were to abstract/protect via a function call, I'd expect the
call to...
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...ude <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int closedir(DIR *dir)
+{
+ int rv;
+ com32sys_t regs;
+ if (dir == NULL) {
+ rv = 0;
+ } else {
+ memset(®s, 0, sizeof regs); /* ?Needed? */
+ regs.eax.w[0] = 0x0022;
+ regs.esi.w[0] = dir->dd_fd;
+ __com32.cs_intcall(0x22, ®s, ®s);
+ free(dir); /* garbage collection? */
+ rv = 0;
+ }
+ return rv;
+}
diff --git a/com32/lib/fdopendir.c b/com32/lib/fdopendir.c
new file mode 100644
index 0000000..83a7ac6
--- /dev/null
+++ b/com32/lib/fdopendir.c
@@ -0,0 +1,13 @@
+/*
+ * fdopendir.c
+ */
+
+#include...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...ude <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int closedir(DIR *dir)
+{
+ int rv;
+ com32sys_t regs;
+ if (dir == NULL) {
+ rv = 0;
+ } else {
+ memset(®s, 0, sizeof regs); /* ?Needed? */
+ regs.eax.w[0] = 0x0021;
+ regs.esi.w[0] = dir->dd_fd;
+ __com32.cs_intcall(0x22, ®s, ®s);
+ free(dir); /* garbage collection? */
+ rv = 0;
+ }
+ return rv;
+}
diff --git a/com32/lib/fdopendir.c b/com32/lib/fdopendir.c
new file mode 100644
index 0000000..83a7ac6
--- /dev/null
+++ b/com32/lib/fdopendir.c
@@ -0,0 +1,13 @@
+/*
+ * fdopendir.c
+ */
+
+#include...
2012 Sep 04
3
INT22h/000Dh
Hi,
I would like to use INT22h, function 000Dh, but I found that it is
disabled in vector table:
in core/comboot.inc:
int22_table:
[...]
dw comapi_err ; 000D clean up then bootstrap
[...]
The code of this function is present in this file (comapi_chainboot).
Why this function is disabled?
Regards
Piotr Romaniuk
PS
I am using syslinux-4.04.
2009 Jul 27
1
[PATCH] mboot using module path
...com32.h>
?int chdir(const char *path)
?{
-??? errno = ENOSYS;
-??? return -1;
+??? com32sys_t regs;
+
+??? strlcpy(__com32.cs_bounce, path, __com32.cs_bounce_size);
+
+??? regs.eax.w[0] = 0x0025;
+??? regs.esi.w[0] = OFFS(__com32.cs_bounce);
+??? regs.es = SEG(__com32.cs_bounce);
+
+??? __com32.cs_intcall(0x22, ®s, ®s);
+
+??? if (!(regs.eflags.l & EFLAGS_CF)) {
+??? ??? return -1;
+??? }
+
+??? /* We're done */
+??? return 0;
?}
+
diff -u -r -X nodiff syslinux-3.82-orig/core/comboot.inc
syslinux-3.82/core/comboot.inc
--- syslinux-3.82-orig/core/comboot.inc 2009-06-09 10:19:...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...turns a structure pointer in SI
* to a structure whose first member happens to be the LBA.
*/
inregs.eax.w[0] = 0x0006;
- inregs.esi.w[0] = OFFS(__com32.cs_bounce);
- inregs.es = SEG(__com32.cs_bounce);
+ inregs.esi.w[0] = OFFS(buf);
+ inregs.es = SEG(buf);
__com32.cs_intcall(0x22, &inregs, &inregs);
if ((inregs.eflags.l & EFLAGS_CF) || inregs.esi.w[0] == 0) {
- return 0; /* Filename not found */
+ goto fail; /* Filename not found */
}
/* Since the first member is the LBA, we simply cast */
@@ -121,14 +127,16 @@ uint32_t get_file_lba(con...
2012 Jul 16
5
[PATCH 0/5] Deleting __intcall() from Syslinux
From: Matt Fleming <matt.fleming at intel.com>
Since we can't use __intcall() for EFI, and since we can now have the
ELF module code resolve all our symbols at runtime, we should delete
as many references to __intcall() as possible and just access the
symbols directly.
The most interesting patch is the support for weak symbols. We need to
be able to reference derivative-specific
2012 Aug 14
1
[GIT PULL] elflink fixes
...bounce buffer */
strlcpy(buf, filename, size);
- /* Call comapi_open() which returns a structure pointer in SI
- * to a structure whose first member happens to be the LBA.
- */
- inregs.eax.w[0] = 0x0006;
- inregs.esi.w[0] = OFFS(buf);
- inregs.es = SEG(buf);
- __com32.cs_intcall(0x22, &inregs, &inregs);
-
- if ((inregs.eflags.l & EFLAGS_CF) || inregs.esi.w[0] == 0) {
+ if (open_file(buf, &fd) <= 0) {
goto fail; /* Filename not found */
}
/* Since the first member is the LBA, we simply cast */
- lba = *((uint32_t *) MK_PTR(inregs.d...