⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setblock.c

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 C
字号:
#include <stdio.h>
#include <dos.h>

void main()
  {
    unsigned short segment;
    unsigned maxsize;

    /* Try to allocate 100 paragraphs, then free them */
    if( _dos_allocmem( 100, &segment ) != 0 ) {
      printf( "_dos_allocmem failed\n" );
      printf( "Only %u paragraphs available\n",segment);
    } else {
      printf( "_dos_allocmem succeeded\n" );
      /* Try to increase it to 200 paragraphs */
      if( _dos_setblock( 200, segment, &maxsize ) != 0 ){
        printf( "Unable to increase the size\n" );
      }
      if( _dos_freemem( segment ) != 0 ) {
        printf( "_dos_freemem failed\n" );
      }
    }
  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -