int x=420;
int huge *ptr=&x;
int *ptr0=&x;
- void __based(__self) *pee;
+ //void __based(__self) *pee;
+ memptr pee;
void __near *npee;
- memptr bigbuffer;
+ void __far *fpee;
+ void *dpee;
__segment segu;
//word csw=0,dsw=0,esw=0,ssw=0,ipw=0;
+ _nheapgrow();
+ _fheapgrow();
+ _heapgrow();
//ptr=&x;
printf("&main()=%Fp\n", *argv[0]);
printf("ptr0=%Fp\n", ptr0);
//printf("cs=%u\n", csw);
//printf("ds=%u\n", dsw);
//printf("es=%u\n", esw);
- printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
- printf("size of pee~=%u\n", _bmsize(segu, pee));
+ printf("memavl=%u\n", _memavl());
+ printf("size of based pee~=%u %FP\n", _bmsize(segu, pee), pee);
+ printf("size of default pee~=%u %FP\n", _msize(dpee), dpee);
+ printf("size of near pee~=%u %FP\n", _nmsize(npee), npee);
+ printf("size of far pee~=%u %FP\n", _fmsize(fpee), fpee);
printf("pee=%Fp\n", pee);
printf("npee=%Fp\n", npee);
printf("&main()=%Fp\n", *argv[0]);
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
#include "16text.h"\r
\r
/* this array holds the rom font descriptors */\r
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
/*\r
* This is the text subsystem for project 16.\r
* These functions provide for the rendering of text strings\r
*/\r
#ifndef TEXT_H\r
#define TEXT_H
+#ifdef __WATCOMC__
#include <jstring.h>
#include <jctype.h>\r
+#endif
#include "src/lib/types.h"\r
\r
/* font information type */\r
+++ /dev/null
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * This file is part of Project 16.
- *
- * Project 16 is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Project 16 is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>, or
- * write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-#include "text.h"
-
-/* this array holds the rom font descriptors */
-font_t romFonts[4];
-
-
-static void getRomFontAddr(char fontNum, int index) {
- word fontSeg;
- word fontOff;
-
- __asm {
- PUSH BP
- MOV AX, 0x1130 ;I can haz font info plz?
- MOV BH, fontNum ; where ur fontNum
- INT 0x10 ;kthxbae
- MOV AX, ES ;save teh segmentz
- MOV BX, BP ;and all the base!
- POP BP ;u can haz ur frame back!
- MOV fontSeg, AX ;Storage
- MOV fontOff, BX ;Storage
- }
- romFonts[index].seg = fontSeg;
- romFonts[index].off = fontOff;
-
-}
-
-/* This function initializes the text engine */
-void textInit() {
- getRomFontAddr(0x02, ROM_FONT_8x14);
- getRomFontAddr(0x03, ROM_FONT_8x8_LOW);
- getRomFontAddr(0x04, ROM_FONT_8x8_HIGH);
- getRomFontAddr(0x06, ROM_FONT_8x16);
- romFonts[ROM_FONT_8x14].charSize=14;
- romFonts[ROM_FONT_8x8_LOW].charSize=8;
- romFonts[ROM_FONT_8x8_HIGH].charSize=8;
- romFonts[ROM_FONT_8x16].charSize=16;
-}
+++ /dev/null
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * This file is part of Project 16.
- *
- * Project 16 is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Project 16 is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>, or
- * write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-/*
- * This is the text subsystem for project 16.
- * These functions provide for the rendering of text strings
- * using the BIOS fonts.
- * They copy the font characters directly to VGA.
- */
-#ifndef TEXT_H
-#define TEXT_H
-#ifdef __WATCOMC__
-#include <jstring.h>
-#endif
-#include "types.h"
-
-/* font information type */
-typedef struct font {
- word seg; //segment for the font
- word off; //offset in the segment for the font
- byte charSize; //bytes in each character
-} font_t;
-
-/* storage for the rom fonts */
-extern font_t romFonts[4];
-#define ROM_FONT_8x14 0
-#define ROM_FONT_8x8_LOW 1
-#define ROM_FONT_8x8_HIGH 2
-#define ROM_FONT_8x16 3
-
-/* This function initializes the text engine */
-void textInit();
-
-#endif