C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[3243] [질문] assembly명령어 함수를 사용하면 out of hash space fatal error가 발생하는데....
알에스 [] 3674 읽음    2000-03-31 00:00
다음 xxx.cpp 파일을 include하여 사용하면 out of hash space error가 발생합니다
도대체 hash space가 뭐고, 어떻게 조치해야 합니까

<< xxx.cpp내용 >>
#include <windows.h>
#include <string.h>
#include "xxx.h"

#pragma inline

//NOMANGLE DllExport BYTE __stdcall GetPrnState()
BYTE __stdcall GetPrnState()
{

    BYTE bRet = 0;

         __asm mov ah, 02h
    __asm mov dx, 00
    __asm int 17h
    __asm mov bRet, ah

    return bRet;



//NOMANGLE DllExport BOOL __stdcall CheckPaper()
BOOL __stdcall CheckPaper()
{

    BOOL blRes;
    BYTE bPrnState;

    bPrnState = GetPrnState();
    if (bPrnState & 0x20) {
        blRes = FALSE;
    } else {
        blRes = TRUE;
    }

    return blRes;



//NOMANGLE DllExport BYTE __stdcall PrintChar(SHORT sChar)
BYTE __stdcall PrintChar(SHORT sChar)
{

    //BYTE bChar = sChar & 0x00ff;  // original
    BYTE bChar = BYTE(sChar & 0x00ff);
    BYTE bRet;

    do {
        __asm mov ah, 02h
        __asm mov dx, 00
        __asm int 17h
        __asm mov bRet, ah
    } while (!(bRet & 0x80));

    __asm mov ah, 01h
    __asm mov dx, 00
    __asm int 17h

    __asm mov ah, 00h
    __asm mov al, bChar
    __asm mov dx, 00h
    __asm int 17h
    __asm mov bRet, ah

    return bRet;



//NOMANGLE DllExport long __stdcall PrintString(LPSTR lpszText)
long __stdcall PrintString(LPSTR lpszText)
{

    long lTextNum;
    long i;
    char chOne;


    lTextNum = strlen(lpszText);

    for (i = 0; i < lTextNum; i++) {
        chOne = lpszText[i];
        PrintChar(chOne);
    }

    return lTextNum;



  << xxx.h 내용>
#ifndef _xxx_H
#define _xxx_H

#define NOMANGLE extern "C"
//#define DllImport __declspec(dllimport)
#define DllExport __declspec(dllexport)

#endif 

-이상입니다-

+ -

관련 글 리스트
3243 [질문] assembly명령어 함수를 사용하면 out of hash space fatal error가 발생하는데.... 알에스 3674 2000/03/31
3264     Re:[질문] assembly명령어 함수를 사용하면 out of hash space fatal error.... 박지훈.임프 3838 2000/04/05
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.