검색결과 리스트
Programming에 해당되는 글 119건
- 2009.06.19 VGA 관련
- 2009.06.07 [MFC] Bitmap Object
- 2009.06.07 [MFC] GDI( Graphics Device Interface )
- 2009.06.04 [MFC] FileOpen
- 2009.05.31 Static Member
- 2009.05.29 하드 디스크 드라이버 ( Hard Disk Driver )
- 2009.05.19 OS 제작의 원리 그리고 Codes - Ch 6. Memory Management 1
- 2009.05.15 메모리 주소별 용량.
- 2009.05.15 어셈블러에서 16진수 입력
- 2009.05.11 naked 함수
글
VGA 관련
VESA 2.0 Specification
'Programming > OS Development' 카테고리의 다른 글
NASM - 3 (0) | 2009.06.29 |
---|---|
NASM - 2 (0) | 2009.06.29 |
하드 디스크 드라이버 ( Hard Disk Driver ) (0) | 2009.05.29 |
OS 제작의 원리 그리고 Codes - Ch 6. Memory Management (1) | 2009.05.19 |
메모리 주소별 용량. (0) | 2009.05.15 |
글
[MFC] Bitmap Object
'Programming > Windows Programming' 카테고리의 다른 글
라디오 버튼 그룹지정 하기 (0) | 2009.08.22 |
---|---|
IP HELP API 설정하기 (0) | 2009.08.22 |
[MFC] 더블 버퍼링 (0) | 2009.06.22 |
[MFC] GDI( Graphics Device Interface ) (0) | 2009.06.07 |
[MFC] FileOpen (0) | 2009.06.04 |
글
[MFC] GDI( Graphics Device Interface )
Create DC to choose a device which u r going to use. After creating DC, GDI returns the handler of the DC. Then, u are able to use the device via the handler. U must release DC, after using the DC. Or else, Memory Leak occurs.
CObject--
|-- CDC
|-- CClientDC
|-- CMetaFileDC
|-- CPaintDC
|-- CWindowDC
1) CDC Class
3) CClientDC Class
4) CPaintDC Class
5) CMetaFileDC Class
'Programming > Windows Programming' 카테고리의 다른 글
라디오 버튼 그룹지정 하기 (0) | 2009.08.22 |
---|---|
IP HELP API 설정하기 (0) | 2009.08.22 |
[MFC] 더블 버퍼링 (0) | 2009.06.22 |
[MFC] Bitmap Object (0) | 2009.06.07 |
[MFC] FileOpen (0) | 2009.06.04 |
글
[MFC] FileOpen
2. 파일 열기 때 사용할 다이얼로그를 하나 만들고 옵션을 수정한다.
-> Clip Siblings : True, Style : Child, Control : True, System Menu : False
그리고, 창의 길이를 옆으로 늘인다( 실제 파일 오픈 할 때 열리는 다이얼로그 보다 크게... 그렇지 않으면 이 다이얼로그의 테두리가 파일 열기 다이얼로그에 보이게 된다).
3. 리소스에 메뉴를 추가하고, 이벤트 핸들러를 추가한다.
-> Message Type : COMMAND, Function Handler Name : OnFileOpen, Class List : 이벤트 핸들러를 추가할 다이얼로그.( A Dialog )
4. A Dialog 의 옵션에 있는 Menu 에 이 새로 만든 Menu를 등록시킨다.
5. 메뉴 이벤트 핸들러에 아래의 소스를 붙여 넣고 수정하여 사용한다.
멀티바이트 용
char szFilter[] = "Text File|*.txt|All Files (*.*)|*.*||";
{
}
유니코드 용
CString szFilter = _T( "HTML 파일|*.htm|All Files (*.*)|*.*||" );
{
'Programming > Windows Programming' 카테고리의 다른 글
라디오 버튼 그룹지정 하기 (0) | 2009.08.22 |
---|---|
IP HELP API 설정하기 (0) | 2009.08.22 |
[MFC] 더블 버퍼링 (0) | 2009.06.22 |
[MFC] Bitmap Object (0) | 2009.06.07 |
[MFC] GDI( Graphics Device Interface ) (0) | 2009.06.07 |
글
Static Member
The case of Public static, U can use this with Binary Scope resolution operator( :: ) and a name of Class, such as "Martian::martiancount".
The case of Private or Protected static, Public static Member function must be exist. This Public Static Function must be called with a name of Class and "::".
When it's inherited, If it's Public or Protected, U could use it w/out Public Static Function in inherited Class. Buf if it's Private, U must use it via Public Static Function in inherited Class.
'Programming > C++ Language' 카테고리의 다른 글
namespace (0) | 2010.03.19 |
---|---|
연산자 오버로딩 (0) | 2009.09.30 |
순수 가상 함수 (0) | 2009.09.26 |
가상 함수의 활용 (0) | 2009.09.25 |
가상 함수에 대한 이해 (0) | 2009.09.25 |
글
하드 디스크 드라이버 ( Hard Disk Driver )
As the upper picture, Hard Disk is consist of "Platter". Platters' circle is called "Track". The invariable part of Track is called Sector. This is the smallest unit of Writting in Disk which is usually 512 Bytes.
There are two modes to access Hard Disk. The first one is called "CSH Mode", the another one is called "LBA Mode( Logical Block Address )".
The former one has the limitation of capacity( 528 MB ). Controlling Hard Disk using Sector 6-bit, Head 4-bit, Track 10-bit and one sector is 512-byte. Therefore, The max capacity which is capable of being controlled is 528MB( = 2^20 * 512-byte ). But the latter one is not. It sees Hard Disk as a group of linear sector. it could be controlled as long as knowing the total number of sector of Hard Disk.
'Programming > OS Development' 카테고리의 다른 글
NASM - 2 (0) | 2009.06.29 |
---|---|
VGA 관련 (0) | 2009.06.19 |
OS 제작의 원리 그리고 Codes - Ch 6. Memory Management (1) | 2009.05.19 |
메모리 주소별 용량. (0) | 2009.05.15 |
어셈블러에서 16진수 입력 (0) | 2009.05.15 |
글
OS 제작의 원리 그리고 Codes - Ch 6. Memory Management
To calculate the size of physical memory
We could calculate in a simple way to check data. Writting data from the certain address then read it. Comparing that two data. If it's the same, there is memory. If not, there is no memory. // 실메모리의 크기를 구한다. byTe = pX[0]; // The start address of the memory. return( nSize * 0x100000 ); // 바이트 단위로 리턴한다.
// 실메모리의 크기를 구한다.
int nGetPhysMemSize()
{
int nI, nSize;
UCHAR *pX, byTe;;
// 메모리는 512메가부터 2기가 바이트까지 뒤진다.
for( nSize = nI = 512; nI < 2048; nI++ )
{
pX = (UCHAR*)( nI * (ULONG)0x100000 ); // nl * 1MB
byTe++; // Increasing the value of the start address.
pX[0] = byTe; // Writting the value on the start address.
if( byTe != pX[0] ) // Comparing between the increased data and the value of the start address.
break; // If it's not the same, there is no memory on that address.
else
nSize++; // If it's the same, there is memory. Keep calculating.
pX[0] -= 1; // Restoring to the previous value
}
}
Physical Memory Management Table
Assigning 1byte to save the status of physical memory. It's like Reference Counter.
When it's zero, it's not used and is available. When it's five, five processors are using it by mapping.
Each page has 1024 entries, which is 4 byte. It means 4 KB allocate to each page.
There are 256 pages In 1 MB Memory. That's why needing 256 byte per 1MB.
To save the counter for 1024MB Memory, 1024 * 256 bytes ( 256 KB ) are required.
Putting P.M.M.T right after kernel image. But, it is no matter where you put P.M.M.T.
Caution ) There is the space for ROM BIOS on 0xF0000. You must not write any data on that.
// allocate one physical page pTbl = bell.pPhysRefTbl; // Physical Memory Management Table // search after 64K if( pTbl[nI] == 0 ) |
int nFreePage( DWORD dwPhysAddr ) pTbl = bell.pPhysRefTbl; pTbl[dwI]--; // Decreasing the counter value with 1 return( 1 ); |
'Programming > OS Development' 카테고리의 다른 글
VGA 관련 (0) | 2009.06.19 |
---|---|
하드 디스크 드라이버 ( Hard Disk Driver ) (0) | 2009.05.29 |
메모리 주소별 용량. (0) | 2009.05.15 |
어셈블러에서 16진수 입력 (0) | 2009.05.15 |
naked 함수 (0) | 2009.05.11 |
글
메모리 주소별 용량.
0x200 -> 16 * 16 * 2 = 512 byte
0x1000 -> 16 * 16 * 16 = 4 KB
0x10000 -> 64 KB
0x100000 -> 1 MB
'Programming > OS Development' 카테고리의 다른 글
하드 디스크 드라이버 ( Hard Disk Driver ) (0) | 2009.05.29 |
---|---|
OS 제작의 원리 그리고 Codes - Ch 6. Memory Management (1) | 2009.05.19 |
어셈블러에서 16진수 입력 (0) | 2009.05.15 |
naked 함수 (0) | 2009.05.11 |
Stack Frame (0) | 2009.05.11 |
글
어셈블러에서 16진수 입력
여기서 h 는 16진수를 표시하기 위한 것으로 소/대 문자 어떤 것을 사용해도 됩니다.
그리고 앞에 붙는 0은 그 다음 나오는 것이 문자( A, B,C, D, E)일 경우에는 사용해야 하지만
숫자일 경우에는 0을 항상 붙일 필요가 없습니다.
'Programming > OS Development' 카테고리의 다른 글
OS 제작의 원리 그리고 Codes - Ch 6. Memory Management (1) | 2009.05.19 |
---|---|
메모리 주소별 용량. (0) | 2009.05.15 |
naked 함수 (0) | 2009.05.11 |
Stack Frame (0) | 2009.05.11 |
NASM - 1 (0) | 2009.03.11 |
글
naked 함수
스택 프레임의 상태 보존을 위해 컴파일러가 어떤 코드도 작성하지 않으므로 접두, 접미는 사용자가 직접 작성해야 한다. C에서는 inline 어셈블리를 사용해야 한다.
함수 정의부에 __declspec(naked) 를 적어주면 naked 호출 규약을 사용 할 수 있다.
'Programming > OS Development' 카테고리의 다른 글
메모리 주소별 용량. (0) | 2009.05.15 |
---|---|
어셈블러에서 16진수 입력 (0) | 2009.05.15 |
Stack Frame (0) | 2009.05.11 |
NASM - 1 (0) | 2009.03.11 |
Segmant and Offset (0) | 2009.03.08 |