亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? example3.cpp

?? 多任務(wù)操作系統(tǒng)控制的DOS環(huán)境下的實現(xiàn)的C語言源程序。 利用時間片的方式
?? CPP
字號:
//--------------------------------------------------------------------------
//
//      EXAMPLE3.CPP: example program 3 for DOS coroutine library.
//      Copyright (c) J.English 1993.
//      Author's address: je@unix.brighton.ac.uk
//
//      Permission is granted to use copy and distribute the
//      information contained in this file provided that this
//      copyright notice is retained intact and that any software
//      or other document incorporating this file or parts thereof
//      makes the source code for the library of which this file
//      is a part freely available.
//
//--------------------------------------------------------------------------

#include <iostream.h>
#include <bios.h>
#include "coroutine.h"

#define ESC     0x1B        // code for the ESC key

//--------------------------------------------------------------------------
//
//      Class Example3.
//
//      This is a coroutine which displays a series of messages.  It
//      illustrates how "terminate" can be used as well as the use of
//      "wait" in a coroutine destructor.
//
class Example3 : public Coroutine
{
  public:
    Example3 (int n)        { num = n; }
    ~Example3 ();

  protected:
    virtual void main ();   // code to be executed by coroutine

  private:
    int num;                // coroutine identification number
};

static int quit = 0;        // flag to request coroutine termination

//--------------------------------------------------------------------------
//
//      Example3::~Example3.
//
//      The coroutine class destructor.  Note how "wait" is called at the
//      beginning of the destructor to ensure the coroutine has terminated
//      before any other finalisation is done.
//
Example3::~Example3 ()
{
    wait ();
    cout << "\nCoroutine E" << num << " finished\n";
}

//--------------------------------------------------------------------------
//
//      Example3::main.
//
//      This is the code executed by each instance of class Example3.
//      It displays a startup message, executes a loop (pausing each
//      time) until the main program sets the "quit" flag, and then
//      displays a termination message before exiting.
//
void Example3::main ()
{
    cout << "\nCoroutine E" << num << " started\n";

    while (!quit)
    {   cout << num << " ";
        pause ();
    }
}

//--------------------------------------------------------------------------
//
//      The main program.
//
//      This creates three instances of class Example3, starts them
//      running and then waits until ESC is pressed.  It then sets
//      the "quit" flag to signal the coroutines to terminate before
//      exiting.  If 1, 2 or 3 is pressed, the corresponding coroutine
//      is immediately terminated.  Note that the loop which waits for
//      a key to be pressed calls "pause" each time to allow the coroutines
//      to execute, and that it uses bioskey(1) (test if a key has been
//      pressed) rather than just bioskey(0) which would wait for a key
//      to be pressed and would not allow the coroutines to run between
//      keypresses.
//
void main ()
{
    Example3 e1 (1), e2 (2), e3 (3);

    //--- announce startup
    cout << "Press ESC to exit, 1 or 2 or 3 to terminate the corresponding\n"
         << "coroutine.  Press any key to start.\n";
    bioskey (0);

    //--- start the coroutines running
    if (!e1.run ())
        cout << "Couldn't start e1\n";
    if (!e2.run ())
        cout << "Couldn't start e2\n";
    if (!e3.run ())
        cout << "Couldn't start e3\n";

    //--- wait for a suitable key to be pressed
    for (;;)
    {   while (bioskey (1) == 0)
            Example3::pause ();
        switch (bioskey (0) & 0xFF)
        {
            case ESC:
                quit = 1;
                return;
            case '1':
                e1.terminate ();
                break;
            case '2':
                e2.terminate ();
                break;
            case '3':
                e3.terminate ();
                break;
        }
    }
}   //--- destructors called here: wait for coroutines to finish, then exit

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品无码一区二区三区| 91精品国产福利在线观看| 久久午夜羞羞影院免费观看| 日韩国产在线一| 91精品国产高清一区二区三区| 在线不卡免费av| 亚洲图片自拍偷拍| 欧美一区二区三区视频在线观看| 中文成人综合网| 91色视频在线| 午夜精品aaa| 精品日韩av一区二区| 国产成人午夜精品5599| 亚洲少妇30p| 欧美日韩卡一卡二| 久久99九九99精品| 欧美三级一区二区| 国产精品久久久久久户外露出| 蜜桃传媒麻豆第一区在线观看| 99国产精品国产精品毛片| 1区2区3区精品视频| 欧美日韩在线播放一区| 亚洲国产成人自拍| 91福利视频网站| 久久成人综合网| 中文字幕日韩精品一区| 大桥未久av一区二区三区中文| 精品国产一区二区三区四区四| 午夜欧美大尺度福利影院在线看 | 欧美专区亚洲专区| 青青草国产成人99久久| 国产精品久久久久aaaa樱花| 国内久久精品视频| 精品国内片67194| 97国产一区二区| 日韩影院精彩在线| 欧美国产日韩精品免费观看| 欧美欧美午夜aⅴ在线观看| 久久99国产乱子伦精品免费| 久久综合九色综合欧美就去吻| 免费国产亚洲视频| 国产精品的网站| 日韩欧美一区在线| 日本高清成人免费播放| 精品亚洲国产成人av制服丝袜| 日韩午夜在线观看视频| 91免费国产在线| 国精品**一区二区三区在线蜜桃 | 久久综合中文字幕| 精品视频1区2区3区| 成人小视频在线| 韩国一区二区视频| 亚洲国产精品二十页| 日韩午夜中文字幕| 精品1区2区3区| 91片在线免费观看| 国产精品99久久不卡二区| 日韩精品亚洲专区| 欧美成人激情免费网| 欧美在线观看视频在线| 蜜臀av亚洲一区中文字幕| 综合电影一区二区三区| 久久久www免费人成精品| 欧美大尺度电影在线| 久久66热re国产| 日韩av在线免费观看不卡| 亚洲伦理在线精品| 欧美一区二区私人影院日本| 欧美自拍偷拍午夜视频| 91网上在线视频| 色综合久久天天综合网| 波多野结衣在线aⅴ中文字幕不卡| 一区二区久久久| 亚洲视频一区在线| 亚洲乱码日产精品bd| 亚洲精品国产a久久久久久 | 美国一区二区三区在线播放| 视频一区二区三区入口| 国产欧美日韩一区二区三区在线观看| 91网站视频在线观看| 91麻豆国产福利精品| 91原创在线视频| 色激情天天射综合网| 青青草国产精品97视觉盛宴| 午夜精品久久久久久久99樱桃| 久久久一区二区| 国产欧美一区二区三区在线老狼| 欧美在线观看视频一区二区| 色屁屁一区二区| 欧美无砖专区一中文字| 欧洲激情一区二区| 精品视频在线视频| 日韩一区二区三区在线| 91精品国产高清一区二区三区| 国产成人在线免费观看| 日本中文字幕一区二区有限公司| 国产精品欧美久久久久无广告| 欧美午夜理伦三级在线观看| 91国产免费观看| 欧美一二三区精品| 精品久久国产97色综合| 日本一区二区三区久久久久久久久不| 日本韩国欧美一区| 在线不卡的av| 精品国产一区二区国模嫣然| 国产精品久久久久一区二区三区 | 91精品国产综合久久香蕉的特点| 顶级嫩模精品视频在线看| 92国产精品观看| 国产一区二区免费视频| 成人免费观看男女羞羞视频| 日本二三区不卡| 日韩视频国产视频| 国产精品系列在线| 一区二区三区鲁丝不卡| 激情欧美日韩一区二区| 不卡一区二区三区四区| 精品视频1区2区3区| 久久亚洲免费视频| 亚洲女爱视频在线| 激情图片小说一区| 91老师片黄在线观看| 成人91在线观看| 在线不卡a资源高清| 亚洲国产成人午夜在线一区 | 久久亚洲一级片| 一区二区久久久久| 久久99精品久久只有精品| 久久国产精品色婷婷| 成人avav影音| 91美女精品福利| 日韩欧美亚洲国产另类| 精品美女一区二区三区| 亚洲欧洲综合另类| 韩国女主播成人在线观看| 色播五月激情综合网| 国产欧美日韩视频在线观看| 婷婷综合五月天| 99久免费精品视频在线观看| 欧美tk丨vk视频| 亚洲国产精品一区二区久久恐怖片 | 91精品在线麻豆| 亚洲欧美在线另类| 国产在线精品一区二区三区不卡| 国产高清精品网站| 欧美一级黄色大片| 亚洲国产日韩一级| 91首页免费视频| 亚洲国产精品v| 国产一区二区三区不卡在线观看| 国产91精品一区二区麻豆亚洲| 成人毛片在线观看| 精品久久久久久无| 舔着乳尖日韩一区| 欧洲激情一区二区| 最近日韩中文字幕| 成人精品一区二区三区四区 | 国产盗摄一区二区三区| 日韩欧美视频一区| 日本大胆欧美人术艺术动态| 激情图片小说一区| 日韩欧美国产精品一区| 日韩中文欧美在线| 欧美优质美女网站| 一区二区三区日韩在线观看| 91在线视频免费观看| 国产精品免费av| 亚洲第一福利一区| 欧美日韩三级一区二区| 亚洲精品乱码久久久久久黑人| 五月天婷婷综合| 欧美美女喷水视频| 日日摸夜夜添夜夜添亚洲女人| 九色porny丨国产精品| 日韩午夜激情电影| 激情欧美一区二区| 国产日韩视频一区二区三区| 亚洲gay无套男同| 国产自产视频一区二区三区| 久久嫩草精品久久久久| 国产精品1区二区.| 欧美精品在线一区二区三区| 亚洲制服丝袜av| 国产福利一区在线| 中文字幕第一区| 成人av资源站| 亚洲一区二区三区激情| 国产成人av影院| 亚洲日本在线看| 91看片淫黄大片一级在线观看| 精品国产伦理网| 国产91在线|亚洲| 久久综合九色综合97婷婷女人 | 香蕉影视欧美成人| 欧美一区永久视频免费观看| 自拍偷拍欧美激情| 欧美精品乱人伦久久久久久| 一区在线观看免费| 欧美巨大另类极品videosbest| 亚洲欧洲www|