char emmname[] = "EMMXXXX0";
__asm {
- mov dx,OFF emmname\r
+ mov dx,OFF=emmname\r
mov ax,0x3d00\r
int 0x21 // try to open EMMXXXX0 device\r
jc error\r
\r
cmp bx,4\r
jle getpages // there is only 1,2,3,or 4 pages\r
- mov bx,4 // we can't use more than 4 pages\r
- }\r
-\r
-getpages:\r
-asm {\r
- mov [EMSpagesmapped],bx\r
- mov ah,EMS_ALLOCPAGES // allocate up to 64k of EMS\r
- int EMS_INT\r
- or ah,ah\r
- jnz error\r
- mov [EMShandle],dx\r
- }\r
- return;\r
-\r
+ mov bx,4 // we can't use more than 4 pages
+
+getpages:
+ mov [EMSpagesmapped],bx\r
+ mov ah,EMS_ALLOCPAGES // allocate up to 64k of EMS\r
+ int EMS_INT\r
+ or ah,ah\r
+ jnz error\r
+ mov [EMShandle],dx
+ jmp End
error:\r
- error = _AH;\r
- strcpy (str,"MML_SetupEMS: EMS error 0x");\r
- itoa(error,str2,16);\r
- strcpy (str,str2);\r
- Quit (str);\r
-\r
-noEMS:\r
-;\r
+ error = _AH;\r
+ strcpy (str,"MML_SetupEMS: EMS error 0x");\r
+ itoa(error,str2,16);\r
+ strcpy (str,str2);\r
+ printf("%s\n",str);
+ jmp End
+noEMS:
+End:\r
+ }\r
}\r
\r
\r
if (!EMShandle)\r
return;\r
\r
- {\r
- mov ah,EMS_FREEPAGES\r
- mov dx,[EMShandle]\r
- int EMS_INT\r
- or ah,ah\r
- jz ok\r
+ __asm
+ {\r
+ mov ah,EMS_FREEPAGES\r
+ mov dx,[EMShandle]\r
+ int EMS_INT\r
+ or ah,ah\r
+ jz ok
+ printf("MML_ShutdownEMS: Error freeing EMS!");
+ ok:\r
}\r
-\r
- Quit ("MML_ShutdownEMS: Error freeing EMS!");\r
-\r
-ok:\r
-;\r
}\r
\r
/*\r
\r
for (i=0;i<EMSpagesmapped;i++)\r
{\r
- {\r
- mov ah,EMS_MAPPAGE\r
- mov bx,[i] // logical page\r
- mov al,bl // physical page\r
- mov dx,[EMShandle] // handle\r
- int EMS_INT\r
- or ah,ah\r
- jnz error\r
+ __asm
+ {\r
+ mov ah,EMS_MAPPAGE\r
+ mov bx,[i] // logical page\r
+ mov al,bl // physical page\r
+ mov dx,[EMShandle] // handle\r
+ int EMS_INT\r
+ or ah,ah\r
+ jnz error
+ jmp End
+ error:\r
+ error = _AH;\r
+ strcpy (str,"MM_MapEMS: EMS error 0x");\r
+ itoa(error,str2,16);\r
+ strcpy (str,str2);\r
+ printf("%s\n",str);
+ End:\r
}\r
}\r
-\r
return;\r
-\r
-error:\r
- error = _AH;\r
- strcpy (str,"MM_MapEMS: EMS error 0x");\r
- itoa(error,str2,16);\r
- strcpy (str,str2);\r
- Quit (str);\r
}\r
\r
//==========================================================================\r
{\r
numUMBs = 0;\r
\r
-asm {\r
- mov ax,0x4300\r
- int 0x2f // query status of installed diver\r
- cmp al,0x80\r
- je good\r
+ __asm
+ {\r
+ mov ax,0x4300\r
+ int 0x2f // query status of installed diver\r
+ cmp al,0x80\r
+ je good
+ good:\r
}\r
- return false;\r
+/* return false;\r
good:\r
- return true;\r
+ return true;*/\r
}\r
\r
\r
{\r
unsigned base,size;\r
\r
- {\r
- mov ax,0x4310\r
- int 0x2f\r
- mov [WORD PTR XMSaddr],bx\r
- mov [WORD PTR XMSaddr+2],es // function pointer to XMS driver\r
- }\r
+ __asm
+ {\r
+ mov ax,0x4310\r
+ int 0x2f\r
+ mov [WORD PTR XMSaddr],bx\r
+ mov [WORD PTR XMSaddr+2],es // function pointer to XMS driver\r
\r
getmemory:\r
- {\r
mov ah,XMS_ALLOCUMB\r
mov dx,0xffff // try for largest block possible\r
call [DWORD PTR XMSaddr]\r
call [DWORD PTR XMSaddr] // DX holds largest available UMB\r
or ax,ax\r
jz done // another error...\r
- }\r
\r
gotone:\r
- {\r
mov [base],bx\r
mov [size],dx\r
}\r
for (i=0;i<numUMBs;i++)\r
{\r
base = UMBbase[i];\r
-\r
- mov ah,XMS_FREEUMB\r
- mov dx,[base]\r
- call [DWORD PTR XMSaddr]\r
+ __asm
+ {\r
+ mov ah,XMS_FREEUMB\r
+ mov dx,[base]\r
+ call [DWORD PTR XMSaddr]
+ }\r
}\r
}\r
\r
c2e.convert_special: 0
e2c.convert_num: 0
-openfiles: /dos/z/cawat/ID_HEADS.H:1260:233:0:
-openfiles: /dos/z/cawat/16_mm.c:3604:3205:0:
-openfiles: /dos/z/cawat/16_mm.h:1364:1519:0:
-openfiles: /dos/z/cawat/ID_CA.C:1203:822:0:
-openfiles: /dos/z/cawat/ID_CA.H:857:343:0:
-openfiles: /dos/z/cawat/16_in.c:1341:982:0:
-openfiles: /dos/z/cawat/16_in.h:4659:4181:1:
-openfiles: /dos/z/cawat/lib_head.h:1091:173:0:
-openfiles: /dos/z/cawat/types.h:240:0:0:
openfiles: /dos/z/16/src/lib/ems.c:3881:957:0:
-openfiles: /dos/z/16/src/lib/ems.h:944:379:0:
+openfiles: /dos/z/16/src/lib/ems.h:944:0:0:
openfiles: /dos/z/keen-src/id_mm.c:3423:3343:0:
+openfiles: /dos/z/16/16/cawat/16_mm.c:4757:4322:1:
+openfiles: /dos/z/16/16/cawat/16_mm.h:0:0:0:
snr_recursion_level: 0
convertcolumn_horizontally: 0
adv_open_matchname: 0
default_mime_type: text/plain
e2c.convert_xml: 1
c2e.convert_iso: 0
-opendir: file:///dos/z
+opendir: file:///dos/z/16/16/cawat
wrap_text_default: 0
bookmarks_filename_mode: 1
ssearch_text: _seg
view_blocks: 1
name: cawatcom
replacelist: /*_1seg*/
-replacelist: /*_1seg*/
+replacelist: /*_1seg*/
replacelist: \t\t
fb_show_hidden_f: 0
editor_tab_width: 4
e2c.convert_iso: 0
ssearch_casesens: 0
charmap_block: 1
+recent_files: file:///dos/z/bakapee.asm
recent_files: file:///dos/z/16/src/lib/ems.c
recent_files: file:///dos/z/16/src/lib/ems.h
recent_files: file:///dos/z/keen-src/id_mm.c
-recent_files: file:///dos/z/bakapee.asm
-recent_files: file:///dos/z/cawat/types.h
-recent_files: file:///dos/z/cawat/ID_CA.C
-recent_files: file:///dos/z/cawat/lib_head.h
+recent_files: file:///dos/z/16/16/cawat/16_mm.err
+recent_files: file:///dos/z/16/16/cawat/16_mm.h
+recent_files: file:///dos/z/16/16/cawat/16_mm.c
snr_replacetype: 0
-savedir: file:///dos/z/cawat
+savedir: file:///dos/z/16/16/cawat
spell_check_default: 1
spell_insert_entities: 0
last_filefilter:
htmlbar_notebooktab: 0
view_blockstack: 1
snr_escape_chars: 1
-htmlbar_view: 1
+htmlbar_view: 0
spell_lang: en
ssearch_dotmatchall: 0
searchlist: _seg
searchlist: peg
searchlist: pg
searchlist: _1
-searchlist: _seg
+searchlist: _seg
searchlist: asm\t
searchlist: lo
searchlist: offset
autocomplete: 1
outputb_show_all_output: 0
bookmarks_show_mode: 0
-snippets_show_as_menu: 1
+snippets_show_as_menu: 0
adv_open_recursive: 0
encoding: SHIFT_JIS
e2c.convert_special: 0
autoindent: 1
fb_viewmode: 0
+filegloblist: *.txt
+filegloblist: *.shtml
+filegloblist: *.py
+filegloblist: *.pl
+filegloblist: *.php
+filegloblist: *.js
+filegloblist: *.java
+filegloblist: *.htm
+filegloblist: *.html
+filegloblist: *.h
+filegloblist: *.css
+filegloblist: *.cpp
+filegloblist: *.cgi
+filegloblist: *.c
+filegloblist: *
recent_dirs: file:///dos/z/cawat
fb_focus_follow: 1
ssearch_unescape: 0
e2c.convert_num: 0
openfiles: /dos/z/16/doc/project.txt:80:0:0:
openfiles: /dos/z/16/src/palettec.c:882:0:0:
-openfiles: /dos/z/16/src/pcxtest.c:906:0:1:
+openfiles: /dos/z/16/src/pcxtest.c:931:0:0:
openfiles: /dos/z/16/src/scroll.c:2847:2098:0:
openfiles: /dos/z/16/src/fmemtest.c:891:0:0:
openfiles: /dos/z/16/src/emmtest.c:405:0:0:
openfiles: /dos/z/16/src/maptest0.c:886:0:0:
openfiles: /dos/z/16/src/test.c:890:0:0:
openfiles: /dos/z/16/src/test2.c:886:0:0:
-openfiles: /dos/z/16/src/lib/modex16.c:9618:9159:0:
+openfiles: /dos/z/16/src/lib/modex16.c:1963:3289:1:
openfiles: /dos/z/16/src/lib/modex16.h:1052:576:0:
openfiles: /dos/z/16/src/lib/planar.h:1008:127:0:
openfiles: /dos/z/16/src/lib/planar.c:894:0:0:
openfiles: /dos/z/16/src/lib/lib_head.c:883:0:0:
openfiles: /dos/z/16/src/lib/lib_head.h:948:377:0:
openfiles: /dos/z/16/makefile:1004:354:0:
-openfiles: /dos/z/16/src/lib/types.h:1009:28:0:
+openfiles: /dos/z/16/src/lib/types.h:1009:0:0:
openfiles: /dos/z/16/src/16.h:943:0:0:
openfiles: /dos/z/16/src/16.c:928:0:0:
openfiles: /dos/z/16/src/lib/scroll16.h:961:0:0:
recent_files: file:///dos/z/16/src/lib/wcpu/wtest.c
recent_files: file:///dos/z/16/src/lib/wcpu/wtest.h
recent_files: file:///dos/z/16/src/lib/wcpu/makefile
+recent_files: file:///dos/z/16/src/pcxtest.c
+recent_files: file:///dos/z/16/doc/project.txt
recent_files: file:///dos/z/16/src/palettec.c
recent_files: file:///dos/z/16/src/fmemtest.c
+recent_files: file:///dos/z/16/src/emmtest.c
+recent_files: file:///dos/z/16/src/maptest.c
recent_files: file:///dos/z/16/src/emsdump.c
+recent_files: file:///dos/z/16/src/scroll.c
+recent_files: file:///dos/z/16/src/maptest0.c
recent_files: file:///dos/z/16/src/test.c
+recent_files: file:///dos/z/16/src/test2.c
+recent_files: file:///dos/z/16/src/lib/modex16.h
recent_files: file:///dos/z/16/src/lib/planar.h
-recent_files: file:///dos/z/16/src/lib/bitmap.c
+recent_files: file:///dos/z/16/src/lib/planar.c
recent_files: file:///dos/z/16/src/lib/modex16.c
+recent_files: file:///dos/z/16/src/lib/bitmap.c
+recent_files: file:///dos/z/16/src/lib/bitmap.h
+recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.h
+recent_files: file:///dos/z/16/src/lib/dos_kb.h
+recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.c
recent_files: file:///dos/z/16/src/lib/dos_kb.c
recent_files: file:///dos/z/16/src/lib/mapread.c
-recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.c
+recent_files: file:///dos/z/16/src/lib/mapread.h
recent_files: file:///dos/z/16/src/lib/fmapread.c
+recent_files: file:///dos/z/16/src/lib/fmapread.h
recent_files: file:///dos/z/16/src/lib/exmm/memory.h
-recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.c
-recent_files: file:///dos/z/16/src/lib/exmm/memory.c
recent_files: file:///dos/z/16/src/lib/exmm/emmret.h
+recent_files: file:///dos/z/16/src/lib/exmm/emmsize.h
+recent_files: file:///dos/z/16/src/lib/exmm/memory.c
+recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.c
recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.h
+recent_files: file:///dos/z/16/src/lib/lib_head.c
+recent_files: file:///dos/z/16/src/lib/lib_head.h
+recent_files: file:///dos/z/16/makefile
+recent_files: file:///dos/z/16/src/lib/types.h
recent_files: file:///dos/z/16/src/16.h
recent_files: file:///dos/z/16/src/16.c
recent_files: file:///dos/z/16/src/lib/scroll16.h
recent_files: file:///dos/z/16/src/lib/scroll16.c
-recent_files: file:///dos/z/16/doc/project.txt
-recent_files: file:///dos/z/16/src/test2.c
-recent_files: file:///dos/z/16/src/maptest0.c
-recent_files: file:///dos/z/16/src/lib/modex16.h
-recent_files: file:///dos/z/16/src/lib/planar.c
-recent_files: file:///dos/z/16/src/maptest.c
-recent_files: file:///dos/z/16/src/emmtest.c
-recent_files: file:///dos/z/16/src/scroll.c
-recent_files: file:///dos/z/16/src/lib/bitmap.h
-recent_files: file:///dos/z/16/src/lib/wcpu/wcpu.h
-recent_files: file:///dos/z/16/src/lib/dos_kb.h
-recent_files: file:///dos/z/16/src/lib/fmapread.h
-recent_files: file:///dos/z/16/src/lib/mapread.h
-recent_files: file:///dos/z/16/src/lib/lib_head.c
-recent_files: file:///dos/z/16/src/lib/exmm/emmsize.h
-recent_files: file:///dos/z/16/src/lib/lib_head.h
-recent_files: file:///dos/z/16/src/lib/types.h
-recent_files: file:///dos/z/16/src/pcxtest.c
-recent_files: file:///dos/z/16/makefile
snr_replacetype: 0
savedir: file:///dos/z/16
spell_check_default: 1