Home | History | Annotate | Download | only in libmenu
      1 /* -*- c -*- ------------------------------------------------------------- *
      2  *
      3  *   Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
      4  *
      5  *   This program is free software; you can redistribute it and/or modify
      6  *   it under the terms of the GNU General Public License as published by
      7  *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
      8  *   Boston MA 02111-1307, USA; either version 2 of the License, or
      9  *   (at your option) any later version; incorporated herein by reference.
     10  *
     11  * ----------------------------------------------------------------------- */
     12 
     13 #ifndef __SYSLNX_H__
     14 #define __SYSLNX_H__
     15 
     16 #include <com32.h>
     17 
     18 //Macros which help user not have to remember the structure of register
     19 // Data structure
     20 
     21 #define REG_AH(x) ((x).eax.b[1])
     22 #define REG_AL(x) ((x).eax.b[0])
     23 #define REG_AX(x) ((x).eax.w[0])
     24 #define REG_EAX(x) ((x).eax.l)
     25 
     26 #define REG_BH(x) ((x).ebx.b[1])
     27 #define REG_BL(x) ((x).ebx.b[0])
     28 #define REG_BX(x) ((x).ebx.w[0])
     29 #define REG_EBX(x) ((x).ebx.l)
     30 
     31 #define REG_CH(x) ((x).ecx.b[1])
     32 #define REG_CL(x) ((x).ecx.b[0])
     33 #define REG_CX(x) ((x).ecx.w[0])
     34 #define REG_ECX(x) ((x).ecx.l)
     35 
     36 #define REG_DH(x) ((x).edx.b[1])
     37 #define REG_DL(x) ((x).edx.b[0])
     38 #define REG_DX(x) ((x).edx.w[0])
     39 #define REG_EDX(x) ((x).edx.l)
     40 
     41 #define REG_DS(x) ((x).ds)
     42 #define REG_ES(x) ((x).es)
     43 #define REG_FS(x) ((x).fs)
     44 #define REG_GS(x) ((x).gs)
     45 
     46 #define REG_SI(x) ((x).esi.w[0])
     47 #define REG_ESI(x) ((x).esi.l)
     48 
     49 #define REG_DI(x) ((x).edi.w[0])
     50 #define REG_EDI(x) ((x).edi.l)
     51 
     52 char issyslinux(void);		/* Check if syslinux is running */
     53 
     54 void runsyslinuxcmd(const char *cmd);	/* Run specified command */
     55 
     56 void gototxtmode(void);		/* Change mode to text mode */
     57 
     58 void syslinux_idle(void);	/* Call syslinux idle loop */
     59 
     60 /* Run command line with ipappend, returns if kernel image not found
     61    If syslinux version too old, then defaults to runsyslinuxcmd */
     62 void runsyslinuximage(const char *cmd, long ipappend);
     63 
     64 #endif
     65