#include "syslinux.h"
#include "biosio.h"

char asm_issyslinux();
#pragma aux asm_issyslinux = \
   "    mov eax, 000003000h " \
   "    mov ebx, 0FFFFFFFFh " \
   "    mov ecx, 0FFFFFFFFh " \
   "    mov edx, 0FFFFFFFFh " \
   "    int 21h              " \
   "    cmp eax,053950000h   " \
   "    jne noway            " \
   "    cmp ebx,04c530000h   " \
   "    jne noway            " \
   "    cmp ecx,04e490000h   " \
   "    jne noway            " \
   "    cmp edx, 058550000h   " \
   "    jne noway   " \
   "                " \
   "    mov al, 1   " \
   "    jmp finish  " \
   "                " \
   "noway:          " \
   "    mov al, 0   " \
   "                " \
   "finish:         " \
   parm [] \
   modify [] \
   value [al];

char issyslinux()
{
   return asm_issyslinux();
}

void asm_runcommand(char *cmd);
#pragma aux asm_runcommand = \
   " mov ax, 3h " \
   " int 22h    " \
   parm [bx] \
   modify [ax];

void runcommand(char *cmd)
{
   asm_runcommand(cmd); 
}

void asm_gototxtmode();
#pragma aux asm_gototxtmode = \
   " mov ax, 5h " \
   " int 22h    " \
   parm [] \
   modify [ax] ;
   
void gototxtmode()
{
   asm_gototxtmode();
}


