*col = REG_DL(outreg);
}
-void gotoxy(char row, char col, char page)
-{
- REG_AH(inreg) = 0x02;
- REG_BH(inreg) = page;
- REG_DX(inreg) = (row << 8) + col;
- __intcall(0x10, &inreg, &outreg);
-}
-
unsigned char sleep(unsigned int msec)
{
unsigned long micro = 1000 * msec;
#define __COM32IO_H__
#include <com32.h>
+#include <stdio.h>
#ifndef NULL
#define NULL ((void *)0)
#endif
+#define CSI "\e["
+
/* BIOS Assisted output routines */
void cswprint(const char *str, char attr, char left);
char getdisppage(); // Get current display page
-void gotoxy(char row, char col, char page);
+static inline void gotoxy(char row, char col, char page)
+{
+ // XXX page
+ printf(CSI "%d;%dH", row + 1, col + 1);
+}
void getpos(char *row, char *col, char page);
#include "menu.h"
#include "com32io.h"
#include <stdlib.h>
+#include <console.h>
// Local Variables
static pt_menusystem ms; // Pointer to the menusystem
// Set up the look of the box
set_box_type(MENUBOXTYPE);
+
+ openconsole(&dev_stdcon_r, &dev_ansiserial_w);
+
return ms;
}