읽을 책 목록
1.경영
The Goal(번역본 동일) 시리즈-It's not luck, Critical Chain, Nessceary but
not
sufficient - 엘리 골드렛

2.마케팅
Crossing Chasm (캐즘 마케팅)
마케팅 불변의 법칙(같은 저자의 다른 책 2~3권)
Puple Cow(보랏빛 소가 온다)
Tipping Point

3.디자인, 공학
디자인과 인간심리(도날드 노만) -> 1~2권 동저자
이 세상을 다시 만들자, 인간과 공학 이야기 -> 헨리 페트로스키

4.기타 등등
The Minto Primid Principle - 바바라 민토
How to read a book(번역본 별로)
Power Reading
자라기 시리즈 - 김진애

5.과학
이기적 유전자
Link(링크)

6.투자 재태크
이상건 - 돈 버는 사람은 분명 따로 있다
워렌 버펫의 완벽 투자기법
벤자민 그레이엄 Inteligent investor
팔면 상한가 사면 하한가인 개미들에게
부동산 대박 그 이후,


-----------------------------------
7.프로그래밍
Pragmatic Programmer(실용주의 프로그래머) - Andy hunt
Extreme Programming Explained - Kent beck
Smalltalk Best Pattern and Practice - Kent beck
Posted by xHuro
,
05.11.27 추가적으로 MFC Server도 같이 구현되어야 한다.
매번 만들기 귀찮아서 올려놓는다.



MFC에서 비동기적으로 read를 하기 위해서는, 콜백을 이용하면 된다.
1. main Dialog Header에 다음과 같이 선언하고
#define WM_SOCKET WM_USER+1

2. Member Function 부분의 핸들러 선언부에 다음과 같이 함수를 선언한다.
afx_msg LRESULT socket_handler(WPARAM wParam, LPARAM lParam)

3. 마지막으로 main Dialog Implementation 중BEGIN_MESSAGE_MAP 부분에 다음과 같이 등록한다.
ON_MESSAGE(WM_SOCKET, socket_handler)

4. socket을 통해 read할 데이터가 buffer에 들어오면, 이를 알려주는 콜백함수를 등록해야 한다. connect 명령이후 다음과 같이 선언하여 등록한다.

'개발 끄적임들 > 케케묵어버린 것들' 카테고리의 다른 글

euc-kr vs utf-8  (1) 2006.01.01
추천 도서  (0) 2005.11.29
Embedded Visual C++ 설치과정  (2) 2005.11.27
open suse 9.3 adobe reader 한글팩 설치  (0) 2005.11.14
USB modem programming on LINUX  (2) 2005.11.14
Posted by xHuro
,
후배 K양이 무려 2주동안 삽질하느라 아무것도 못한 상태에서 내가 시도했다.

1. Embedded Visual C++ 4.0을 다운로드.
http://download.microsoft.com/download/WindowsCENETPlatformBuilder/Install/4.0/NT5XP/EN-US/eVC4.exe

CD-key : TRT7H-KD36T-FRH8D-6QH8P-VFJHQ

2. Embedded Visual C++ 4.0 SP4를 다운로드.
http://download.microsoft.com/download/a/7/3/a735c7fb-dcbd-429f-9090-d09b3b15d3fa/evc4sp4.exe

3. Software Development Kit for Windows Mobile 2003-based Pocket PCs를 다운로드.
http://download.microsoft.com/download/6/9/5/69570242-44e8-45e6-a252-9bd56db8ec83/Microsoft%20Pocket%20PC%202003%20SDK.msi

4. 다운로드 받은 파일을 차례대로 설치

5. Visual Studio 6.0과 매우 흡사한 Embedded Visual C++ 4.0 실행


p.s K양... 도대체 머가 안된단 말이냐?

'개발 끄적임들 > 케케묵어버린 것들' 카테고리의 다른 글

추천 도서  (0) 2005.11.29
간단한 socketClass (MFC Client용)  (0) 2005.11.27
open suse 9.3 adobe reader 한글팩 설치  (0) 2005.11.14
USB modem programming on LINUX  (2) 2005.11.14
간단한 부트 로더  (0) 2005.11.04
Posted by xHuro
,
adobe에 가서 한글팩을 다운로드 받는다.
gz 압축파일을 풀어, INSTALL 스크립트를 실행한다.
accept 이후
디렉토리를 넣어야 되는데
9.3은 기본적으로 /usr/X11R6/lib/Acrobat7/Reader를 입력하면 된다.
Posted by xHuro
,
내 대학 생활 마지막 텀을 화려하게 장식하기 위해 여러 자료를 모으고 있다. PDA, 핸드폰, 임베디드 개발장비, smart Dust, Linux 그리고 웹까지 연동을 하는 것이 목표다.

참고 블로그
http://agbird.egloos.com/833938

참고문서
Programming Guide for Linux USB Device Drivers : http://www.lrr.in.tum.de/Par/arch/usb/usbdoc/
http://kldp.org/HOWTO/html/USB/USB-HOWTO.html
http://www.icewalkers.com/Linux/Howto/Modem-HOWTO.html
http://www.hackgnu.org/ril-howto.html
http://navasgrp.home.att.net/tech/sch-8500/#Commands

내 핸드폰 설정
메뉴->0번 길게->6725->속도를 전부 115200으로 설정

AT command
http://www.zoltrix.com/support_html/modem/USEMODEM.HTM

USB Communication using C++
http://www.control.com/1026206050/index_html

Linux USB:
http://www.linux-usb.org/

Linux에서 USB 명령들
현재 usb 목록들 보기 : lsusb
연결된 usb 장비 정보 보기 : hwinfo --usb

내 컴퓨터에서의 삼성 핸드폰 정보
07: USB 00.0: 10200 Modem
[Created at usb.122]
Unique ID: hSuP.q6pPHUknfG0
Parent ID: pBe4.M2Y4Cw02nzC
SysFS ID: /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.0
SysFS BusID: 2-2:1.0
Hardware Class: modem
Model: "Samsung Electronics SAMSUNG CDMA Technologies"
Hotplug: USB
Vendor: usb 0x04e8 "Samsung Electronics Co., Ltd."
Device: usb 0x6601 "SAMSUNG CDMA Technologies"
Serial ID: ""
Driver: "cdc_acm"
Device File: /dev/ttyACM0
Speed: 1.5 Mbps
Config Status: cfg=no, avail=yes, need=no, active=yes
Attached to: #5 (Hub)


CDC-ACM 소스 :
/usr/src/linux/driver/usb/class

CDC-ACM driver :
/lib/modules/2.6.11.4-21.9-default/kernel/drivers/usb/class

Kermit:
http://www.ee.pdx.edu/~rootd/catdoc/guide/TheGuide_227.html
Posted by xHuro
,
" target="_blank">부트 로더 만들기포스트 참고
Boot Loader
http://www.nondot.org/sabre/os/articles

NASM 다운로드 : http://www.kernel.org/pub/software/devel/nasm/binaries

Intel 80386 Reference Programmer's Manual :
http://www.baldwin.cx/386htm/toc.htm

Edit plus2 Nasm 구문 파일:


Interrupt Vector Table :
http://www.beyondlogic.org/interrupts/interupt.htm

Protected MODE:
http://www.answers.com/topic/x86-assembly-programming-in-protected-mode
http://www.answers.com/topic/x86-assembly-programming-in-real-mode
http://x86.ddj.com/articles/pmbasics/tspec_a1_doc.htm
Posted by xHuro
,
우연히 블로깅하다 알아낸 사이트.
웹에 관심있는 사람이라면 알거 같다.

http://validator.w3.org

검사할 주소 적거나 파일을 업로드하고 check를 누르면 된다.

내 블로그의 메인 페이지는 무려 75의 에러가 나왔다 ㅠㅜ

http://validator.w3.org/check?uri=http%3A%2F%2Fkid.pe.kr%2Fblog%2Findex.php

p.s 한가한 일요일에 이것들이랑 씨름이나 하고 있을까나...
에러랑 씨름하기엔 날씨가 너무 좋다 ㅠㅜ
Posted by xHuro
,
어제의 KUbuntu 5.10 한글 삽질 이후로 욱! 해서, Ubuntu 5.10을 다시 설치했다^^

Ubuntu 5.10 breezy 스크린샷!



배경화면은 내가 좋아하는 3threeGO의 한장면...
왠지 내 자취방과 분위기가 비슷(?) 해서 넣어놨다.

지금 이 포스트도 Ubuntu 상에서 작성하는 것이다.
음 정녕 KUbuntu 한글은 어려운건가 ㅡㅡ;
Posted by xHuro
,

나의 KUbuntu 스크린샷



어제 새로운 버젼이 릴리즈 되었다. 5.04 hoary때와는 약간 다른 분위기이군...
새로이 설치하고 새 기분으로 스샷을 찍었는데...
그런데, 왜 한글이 안되지? 결국은 스샷 찍어서 XP로 들고 왔다 @.@
혹시나 아는 사람은 트랙백을 날려주길...
(kldp랑 ubuntu.or.kr 에서 알려준 방법을 다 동원해도 안된다..흑 ㅠㅜ)

p.s 어이없게도 한글을 성공(?) 시켰다.
apt-get install imhangul 해도 안되는 줄 알았는데..
일단 파이어폭스에서는 한글이 잘 먹힌다. 다른 KDE 애플리케이션에서는 안 먹는다.
Posted by xHuro
,

ucosx86p.zip 소스를 vmware에서 실행한 화면



1. http://e2g.org 자료실에 있는 토요 세미나의 UCOS 실행하기 문서를 참고했다.
소스는 아래의 참고 자료에도 링크 해놨으므로 다운받아서 위의 문서를 참고하여 img 파일을 생성한다. 플로피 디스크로 복사하기 전까지, 즉 debug까지 그대로 한다. 소스에 build.bat 라는 파일로 스크립트가 만들어져 있다.

2. VMWare용 부팅 이미지 제작은 여리의 작업실에 있는 Chobits OS 문서를 참고 했다.
부트섹터 부분에 bootsect.bin 대신 소스에 포함된 BOOTSCTR.IMG를 넣어주고, inject하여 MyTask.IMG(컴파일되어 생성된 이미지)를 넣어준다.

3. VMWare의 플로피 부분에 이미지를 선택하고 부팅하면 완성!


p.s 2005.9.11 uClinux에서 uCOS로 카테고리 및 포스트명 변경
p.s2 잠이 와서 대강 썼는데 조만간 자세히 업데이트 해야겠다.
p.s3 다음은 키보드 인터럽트 부분이다

Posted by xHuro
,
이상하게도 TG N6432 1.6G에서는 9.2 버전의 x-window 해상도 설정이 삐리리 하다..
XFdrake 설정프로그램으로 다시 설정해야한다.

수세 리눅스 9.3에서 mp3듣기
참고문서 : http://www.suse.or.kr/suse/?doc=bbs/gnuboard.php&bo_table=tip&wr_id=120
미러사이트 : http://ftp.kreonet.re.kr/pub/Linux/suse/i386/9.3/suse/i586/
Posted by xHuro
,
1. vi 에디터 기능 중 신기하면서도 재미있는 기능 5가지를 골라서 설명하시오

2. 현재 자신의 Shell을 csh 혹은 tcsh로 바꾸는 방법을 설명하시오

3. 현재의 Shell Prompt를 $시스템이름:현재디렉토리> 형태로 표현될 수 있게 .cshrc or .login 등 리소스 파일을 수정하시오. (수정된 리소스 파일 내용을 새로 적용하기 위해서는 source “리소스 파일”로 수행하면 됩니다.)

4. 현재 디렉토리에 있는 실행파일을 수행시키기 위해 $PATH을 수정하여야 합니다. (1) Shell Prompt에서 수정하는 방법과 (2) 리소스 파일을 수정하는 방법을 설명하시오
(1) export PATH=$PATH:$PWD
(2) .bash_profile 을 수정후 source .bash_profile


5. File mode를 바꾸는 명령어를 찾고, 실제 활용 예를 설명하시오
chmod 755 public_html -> 웹브라우저로 계정 접근 가능

6. cat > notes 를 실행시키면 어떠한 작업을 할 수 있는지 설명하시오
새로운 파일 생성 및 작성

7. 유닉스에서는 Direct Terminal-to-Terminal Communication 방법 (간단한 1:1 채팅)이 있습니다. 실제 활용 예를 설명하시오.
talk

8. grep, exec, find 명령을 조합하여 지정 디렉토리 이하 서브디렉토리 아래에서 검색할 문자열이 있는 파일들을 출력하는 Shell Script를 작성하고 활용 예를 설명하시오.
grep "찾을문자열" `find . -name '*' -print `

9. Background 및 Foreground 실행에 대해 설명하시오

10. diff 및 comp 명령어에 대해 설명하시오

11. whereis와 같이 유사한 Shell Script를 작성하시오. (whereis에서 제공하는 옵션은 구현하지 않아도 됩니다.)

12. UNIX에서 alias 기법에 대해 설명을 하고 rm 명령어를 interactive 모드로 alias하는 방법을 설명하시오

13. makefile의 한 예를 만들고, 구현한 makefile의 우수성을 보여 줄 수 있는 예제 프로그램들을 구현하여 활용 예를 보여 주시오.

14. gdb를 활용하는 방법에 대한 구체적인 활용 예제를 보여 주시오
15. SIGHUP / SIGBUS / SIGSEGV signal이 무엇인지를 설명하고 SIGBUS와 SIGSEGV를 발생시키는 프로그램을 구현하여 이러한 signal이 발생하는 이유를 설명하고, 해당 프로그램이 정상적으로 동작할 수 있게 수정하시오.

p.s 우리과 유닉스 시스템 수업의 Report 중 하나. 아직 답을 다 못 달았다. 유닉스에 대한 간단한 지식 테스트 및 유용한 것이 많아 올려봤다.
Posted by xHuro
,
자바 관련 커뮤니티
자바 스터디 : http://www.javastudy.co.kr
자바 서비스넷 : http://www.javaservice.net
제이스톰 : http://www.jstorm.pe.kr
프로 자바 : http://www.projava.com
자바 카페 : http://www.javacafe.or.kr
자바 모델링 : http://www.javamodeling.com
J2EE 스터디 : http://www.j2eestudy.co.kr
JSP School : http://www.jspschool.com
OK JSP : http://www.okjsp.pe.kr
플렉스 개발자 : http://www.flex.or.kr
자바크래프트 : http://www.javacraft.net
자바 유저스넷 : http://www.javausers.net
모바일 자바 : http://www.mobilejava.co.kr
자바지기 : http://www.javajigi.net
OpenSeed : http://www.openseed.net

MS 커뮤니티
코드프로젝트 : http://www.codeproject.com
코드구루 : http://www.codeguru.com
데브피아 : http://www.devpia.com
고수닷넷 : http://www.gosu.net
C# 나라 : http://www.csharpnara.com
Mxpert : http://www.mxpert.net
한국 닷넷 사용자 : http://www.knug.or.kr
CShaper : http://www.csharper.co.kr
태요 : http://www.taeyo.net
Neovis : http://www.neovis.pe.kr
후니 : http://www.hoonsbara.com
mcpworld : http://www.mcpworld.com
WECOM : http://wecom.dstcorp.com
모바일 닷넷 : http://www.mobilemagpie.net
YesPartnet : http://www.yespartner.com/kr/community

데이터베이스 커뮤니티
엔코아컨설팅 : http://www.encore.com
한국데이터베이스 진흥센터 : http://www.dpc.or.kr
DB 구축 운영 종합 : http://www.dbguide.net
데이터베이스 사랑넷: http://database.sarang.net
PostgreSQL 국내 : http://www.postgresql.or.kr
PostgreSQL 공식 : http://www.postgresql.org

오픈소스 커뮤니티
KLDP : http://www.kldp.org
OOPS : http://oops.org
공개 소프트웨어 기술지원 센터 : http://help.oss.or.kr
한글 아파치 사용자 모임 : http://www.apache-kr.org
PHP 스쿨 : http://www.phpschool.com
한국 리눅스 유저 그룹 : http://www.lug.or.kr
리눅스포탈 : http://www.superuser.co.kr
리눅스 문서화 프로젝트 : http://www.linuxdoc.org / http://www.tldp.org
슬래쉬닷 : http://www.slashdot.org
Open Source Development Lab : http://www.osdl.org
Open Source Initiative : http://www.opensource.org
소스포지넷 : http://www.sourceforge.net
플래시밋닷넷 : http://www.freshmeat.net
사바나 : http://savannah.gnu.org

아침에 후배가 사온 마소에서 보니 좋은 커뮤니티가 많이 소개되어 있어 슬쩍 했습니다^^ 혹시 오타가 있거나 링크가 깨어졌거나 알고 있는 좋은 커뮤니티가 빠져있으면 댓글 달아주면 좋겠네요.
Posted by xHuro
,
http://www.joinc.co.kr/modules/moniwiki/wiki.php/article_ddk
Posted by xHuro
,
졸업과제의 다른 파트인 빽가구가 열심히 알고리즘을 분석하는 동안, 몸이 근질근질해서 안되겠다.

나의 3년된 절친한 친구(ca-64s)가 죽은 관계로 새로 장만하자니 없는 생활이 더 궁해질 거 같고, 어차피 졸업과제도 임베디드쪽이니...

하나 만들어 볼까 한다.

1. Atmega 128L 기본회로 구성 (2005.08.08)
- 기본 회로

가장 간단한 Atmega 128L 기본회로


- OrCAD 9.1용 프로젝트 파일


2. MP3 player 제작 기본 일정 (2005.09.04)
(1) Atmega 128L에 대한 기본 지식 및 하드웨어 스펙, 프로그래밍 이해
(2) 기본 회로 구성(GPIO, Interrupt)
(3) CF card interface 구성 및 FAT16 파일시스템 구현
(4) ....


Posted by xHuro
,

micaz

MTS300 senserboard


MTS310 senserboard


MIB510 programmingboard


기본 스펙..

■ Wireless Measurement System, MICAz
- 2.4 GHz, IEEE 802.15.4 compliant
- Tiny, Wireless Measurement System
- FCC Certified
- Designed Specifically for Deeply Embedded Sensor Networks
- 250 kbps, High Data Rate Radio
- Wireless Communications with Every Node as Router Capability
- Expansion Connector for Light, Temperature, RH, Barometric Pressure, Acceleration/Seismic, Acoustic, Magnetic, and other Crossbow Sensor Boards

■ Applications
- Indoor Building Monitoring and Security
- Acoustic, Video, Vibration, and Other High Speed Sensor Data
- Large Scale Sensor Networks (1000+ Points)
- ZigBee Compliant Systems and Sensors

개발 환경..

- CPU : Pentium III 800EB Mhz
- Memory : SDRam 384M
- O/S : Suse 9.2
- Env : KDE 3.3

Suse에서 RPM으로 TinyOS 설치..

1. 여기에 가서 IBM SDK for 32-bit xSeries (Intel compatible) 시리즈를 다운받는다.
- IBMJava2-SDK-142.rpm
- IBMJava2-JAVACOMM-142.rpm

2. 여기에 가서 avarice, binutils, gcc, insight(aka gdb), avr-libc를 다운받는다.
- avarice-2.0.20030825cvs-1.i386.rpm
- avr-binutils-2.13.2.1-1.i386.rpm
- avr-binutils-2.15tinyos-1.i386.rpm
- avr-gcc-3.3tinyos-1.i386.rpm
- avr-insight-pre6.0cvs.tinyos-1.3.i386.rpm
- avr-libc-20030512cvs-1.i386.rpm
- graphviz-1.10-1.i386.rpm

3. 여기nesCtinyOS를 다운로드 받는다.
- nesc-1.1.2b-1.i386.rpm
- tinyos-1.1.0-1.noarch.rpm

4. java tools을 컴파일 한다. tinyOS가 설치된 곳은 /opt/tinyos-1.x이다.
cd tools/java
make

5. 마지막으로 .bashrc 또는 .bash_profile에 다음을 추가한다.
#PATH
export PATH=$PATH:/opt/IBMJava2-142/bin:/usr/local/avr/bin
#CLASSPATH
export CLASSPATH=.:/opt/IBMJava2-142/lib:/opt/IBMJava-142/jre/lib/ext/comm.jar:opt/tinyos-1.x/tools/java
#TOSDIR
export TOSDIR=/opt/tinyos-1.x/tos


설치 참고 사이트..
http://www.tinyos.net/linux-1_0_0.html
http://www.tinyos.net/tinyos-1.x/doc/install.html


nesC Compile..
make micaz install mib510,/dev/ttyS0






자그마한 팁들
make docs micaz[platform에 맞게 써준다]

- 컴파일시 위와 같이 하면 아래 그림처럼 HTML Documentation이 만들어져 어떤 Component들이 연결되어 있는 지 확인할 수 있다. (doc 디렉토리 안에 만들어 생성된다)

CntToLedsAndRfm
Documentation



- 각 노드들의 아이디를 줄때는 다음과 같이 컴파일 한다.
make micaz install,[NodeID] mib510,/dev/ttyS0


05.07.13 - 드디어 졸업과제의 시작이다.
05.07.26 - 서서히 졸업과제 버닝 모드로 돌입하고 있다.
05.08.10 - 낮과 밤이 바뀐 채로 삽질은 계속된다.
05.08.21 - 토익 시험으로 인한 졸업과제 잠시 파업중!
05.08.28 - 토익 시험을 마치고 다시 버닝 모드 돌입! Time Sync에 대한 자료 업데이트 구상중이다.
05.09.01 - 최종 디버깅에 최선을 다하고 있으나, 디버깅할수록 오차가 커져 좌절중이다.
05.09.07 - 박사 과정 한분이 들어오신다길래, 컴퓨터의 소스를 백업했으나, 라이브러리 파일을 백업 안하는 바람에 또 한번 자빠졌다.
05.09.14 - 저녁에 있을 거의 최종 검사때문에 밤샘중... 오차는 어느 정도 줄였고, 라이브러리 파일은 다시 제작했다. 그런데... 베이스가 동시에 데이터를 받지 않는다 orz
05.09.22 - 일주일 빡세게 딴 짓하고(그렇다고 논 건 절대 아니다!), 밤새서 해결했다. 각 노드들이 베이스로 전송하는 시간을 딜레이 주어 다 받도록 하였다. 더불어 MFC 시리얼 통신도 해결!
invalid-file

aTracker nesC 소스 코드 (cygwin용)


invalid-file

aTracker nesC 소스 코드 (cygwin용) 주석버전

Posted by xHuro
,
This is the assembly source for the boot sector used by the Linux free operating system. If it looks unfamiliar for intel assembly, that's because it gets run through the standard C preprocessor (CPP) and has comments starting with '!' stripped off... enjoy! :)


!
! SYS_SIZE is the number of clicks (16 bytes) to be loaded.
! 0x7F00 is 0x7F000 bytes = 508kB, more than enough for current
! versions of linux which compress the kernel
!
#include
SYSSIZE = DEF_SYSSIZE
!
! bootsect.s Copyright (C) 1991, 1992 Linus Torvalds
! modified by Drew Eckhardt
! modified by Bruce Evans (bde)
!
! bootsect.s is loaded at 0x7c00 by the bios-startup routines, and moves
! itself out of the way to address 0x90000, and jumps there.
!
! bde - should not jump blindly, there may be systems with only 512K low
! memory. Use int 0x12 to get the top of memory, etc.
!
! It then loads 'setup' directly after itself (0x90200), and the system
! at 0x10000, using BIOS interrupts.
!
! NOTE! currently system is at most (8*65536-4096) bytes long. This should
! be no problem, even in the future. I want to keep it simple. This 508 kB
! kernel size should be enough, especially as this doesn't contain the
! buffer cache as in minix (and especially now that the kernel is
! compressed :-)
!
! The loader has been made as simple as possible, and continuous
! read errors will result in a unbreakable loop. Reboot by hand. It
! loads pretty fast by getting whole tracks at a time whenever possible.

.text

SETUPSECS = 4 ! nr of setup-sectors
BOOTSEG = 0x07C0 ! original address of boot-sector
INITSEG = DEF_INITSEG ! we move boot here - out of the way
SETUPSEG = DEF_SETUPSEG ! setup starts here
SYSSEG = DEF_SYSSEG ! system loaded at 0x10000 (65536).

! ROOT_DEV & SWAP_DEV are now written by "build".
ROOT_DEV = 0
SWAP_DEV = 0
#ifndef SVGA_MODE
#define SVGA_MODE ASK_VGA
#endif
#ifndef RAMDISK
#define RAMDISK 0
#endif
#ifndef CONFIG_ROOT_RDONLY
#define CONFIG_ROOT_RDONLY 1
#endif

! ld86 requires an entry symbol. This may as well be the usual one.
.globl _main
_main:
#if 0 /* hook for debugger, harmless unless BIOS is fussy (old HP) */
int 3
#endif
mov ax,#BOOTSEG
mov ds,ax
mov ax,#INITSEG
mov es,ax
mov cx,#256
sub si,si
sub di,di
cld
rep
movsw
jmpi go,INITSEG

! ax and es already contain INITSEG

go: mov di,#0x4000-12 ! 0x4000 is arbitrary value >= length of
! bootsect + length of setup + room for stack
! 12 is disk parm size

! bde - changed 0xff00 to 0x4000 to use debugger at 0x6400 up (bde). We
! wouldn't have to worry about this if we checked the top of memory. Also
! my BIOS can be configured to put the wini drive tables in high memory
! instead of in the vector table. The old stack might have clobbered the
! drive table.

mov ds,ax
mov ss,ax ! put stack at INITSEG:0x4000-12.
mov sp,di
/*
* Many BIOS's default disk parameter tables will not
* recognize multi-sector reads beyond the maximum sector number
* specified in the default diskette parameter tables - this may
* mean 7 sectors in some cases.
*
* Since single sector reads are slow and out of the question,
* we must take care of this by creating new parameter tables
* (for the first disk) in RAM. We will set the maximum sector
* count to 36 - the most we will encounter on an ED 2.88.
*
* High doesn't hurt. Low does.
*
* Segments are as follows: ds=es=ss=cs - INITSEG,
* fs = 0, gs is unused.
*/

! cx contains 0 from rep movsw above

mov fs,cx
mov bx,#0x78 ! fs:bx is parameter table address
push ds
seg fs
lds si,(bx) ! ds:si is source

mov cl,#6 ! copy 12 bytes
cld
push di

rep
movsw

pop di
pop ds

movb 4(di),*36 ! patch sector count

seg fs
mov (bx),di
seg fs
mov 2(bx),es

! load the setup-sectors directly after the bootblock.
! Note that 'es' is already set up.
! Also cx is 0 from rep movsw above.

load_setup:
xor ah,ah ! reset FDC
xor dl,dl
int 0x13

xor dx, dx ! drive 0, head 0
mov cl,#0x02 ! sector 2, track 0
mov bx,#0x0200 ! address = 512, in INITSEG
mov ah,#0x02 ! service 2, nr of sectors
mov al,setup_sects ! (assume all on head 0, track 0)
int 0x13 ! read it
jnc ok_load_setup ! ok - continue

push ax ! dump error code
call print_nl
mov bp, sp
call print_hex
pop ax

jmp load_setup

ok_load_setup:

! Get disk drive parameters, specifically nr of sectors/track

#if 0

! bde - the Phoenix BIOS manual says function 0x08 only works for fixed
! disks. It doesn't work for one of my BIOS's (1987 Award). It was
! fatal not to check the error code.

xor dl,dl
mov ah,#0x08 ! AH=8 is get drive parameters
int 0x13
xor ch,ch
#else

! It seems that there is no BIOS call to get the number of sectors. Guess
! 36 sectors if sector 36 can be read, 18 sectors if sector 18 can be read,
! 15 if sector 15 can be read. Otherwise guess 9.

mov si,#disksizes ! table of sizes to try

probe_loop:
lodsb
cbw ! extend to word
mov sectors, ax
cmp si,#disksizes+4
jae got_sectors ! if all else fails, try 9
xchg ax, cx ! cx = track and sector
xor dx, dx ! drive 0, head 0
xor bl, bl
mov bh,setup_sects
inc bh
shl bh,#1 ! address after setup (es = cs)
mov ax,#0x0201 ! service 2, 1 sector
int 0x13
jc probe_loop ! try next value

#endif

got_sectors:

! Restore es

mov ax,#INITSEG
mov es,ax

! Print some inane message

mov ah,#0x03 ! read cursor pos
xor bh,bh
int 0x10

mov cx,#9
mov bx,#0x0007 ! page 0, attribute 7 (normal)
mov bp,#msg1
mov ax,#0x1301 ! write string, move cursor
int 0x10

! ok, we've written the message, now
! we want to load the system (at 0x10000)

mov ax,#SYSSEG
mov es,ax ! segment of 0x010000
call read_it
call kill_motor
call print_nl

! After that we check which root-device to use. If the device is
! defined (!= 0), nothing is done and the given device is used.
! Otherwise, one of /dev/fd0H2880 (2,32) or /dev/PS0 (2,28) or /dev/at0 (2,8),
! depending on the number of sectors we pretend to know we have.

seg cs
mov ax,root_dev
or ax,ax
jne root_defined
seg cs
mov bx,sectors
mov ax,#0x0208 ! /dev/ps0 - 1.2Mb
cmp bx,#15
je root_defined
mov al,#0x1c ! /dev/PS0 - 1.44Mb
cmp bx,#18
je root_defined
mov al,#0x20 ! /dev/fd0H2880 - 2.88Mb
cmp bx,#36
je root_defined
mov al,#0 ! /dev/fd0 - autodetect
root_defined:
seg cs
mov root_dev,ax

! after that (everything loaded), we jump to
! the setup-routine loaded directly after
! the bootblock:

jmpi 0,SETUPSEG

! This routine loads the system at address 0x10000, making sure
! no 64kB boundaries are crossed. We try to load it as fast as
! possible, loading whole tracks whenever we can.
!
! in: es - starting address segment (normally 0x1000)
!
sread: .word 0 ! sectors read of current track
head: .word 0 ! current head
track: .word 0 ! current track

read_it:
mov al,setup_sects
inc al
mov sread,al
mov ax,es
test ax,#0x0fff
die: jne die ! es must be at 64kB boundary
xor bx,bx ! bx is starting address within segment
rp_read:
#ifdef __BIG_KERNEL__
#define CALL_HIGHLOAD_KLUDGE .word 0x1eff,0x220 ! call far * bootsect_kludge
! NOTE: as86 can't assemble this
CALL_HIGHLOAD_KLUDGE ! this is within setup.S
#else
mov ax,es
sub ax,#SYSSEG
#endif
cmp ax,syssize ! have we loaded all yet?
jbe ok1_read
ret
ok1_read:
mov ax,sectors
sub ax,sread
mov cx,ax
shl cx,#9
add cx,bx
jnc ok2_read
je ok2_read
xor ax,ax
sub ax,bx
shr ax,#9
ok2_read:
call read_track
mov cx,ax
add ax,sread
cmp ax,sectors
jne ok3_read
mov ax,#1
sub ax,head
jne ok4_read
inc track
ok4_read:
mov head,ax
xor ax,ax
ok3_read:
mov sread,ax
shl cx,#9
add bx,cx
jnc rp_read
mov ax,es
add ah,#0x10
mov es,ax
xor bx,bx
jmp rp_read

read_track:
pusha
pusha
mov ax, #0xe2e ! loading... message 2e = .
mov bx, #7
int 0x10
popa

mov dx,track
mov cx,sread
inc cx
mov ch,dl
mov dx,head
mov dh,dl
and dx,#0x0100
mov ah,#2

push dx ! save for error dump
push cx
push bx
push ax

int 0x13
jc bad_rt
add sp, #8
popa
ret

bad_rt: push ax ! save error code
call print_all ! ah = error, al = read


xor ah,ah
xor dl,dl
int 0x13


add sp, #10
popa
jmp read_track

/*
* print_all is for debugging purposes.
* It will print out all of the registers. The assumption is that this is
* called from a routine, with a stack frame like
* dx
* cx
* bx
* ax
* error
* ret <- sp
*
*/

print_all:
mov cx, #5 ! error code + 4 registers
mov bp, sp

print_loop:
push cx ! save count left
call print_nl ! nl for readability

cmp cl, #5
jae no_reg ! see if register name is needed

mov ax, #0xe05 + 'A - 1
sub al, cl
int 0x10

mov al, #'X
int 0x10

mov al, #':
int 0x10

no_reg:
add bp, #2 ! next register
call print_hex ! print it
pop cx
loop print_loop
ret

print_nl:
mov ax, #0xe0d ! CR
int 0x10
mov al, #0xa ! LF
int 0x10
ret

/*
* print_hex is for debugging purposes, and prints the word
* pointed to by ss:bp in hexadecimal.
*/

print_hex:
mov cx, #4 ! 4 hex digits
mov dx, (bp) ! load word into dx
print_digit:
rol dx, #4 ! rotate so that lowest 4 bits are used
mov ax, #0xe0f ! ah = request, al = mask for nybble
and al, dl
add al, #0x90 ! convert al to ascii hex (four instructions)
daa
adc al, #0x40
daa
int 0x10
loop print_digit
ret


/*
* This procedure turns off the floppy drive motor, so
* that we enter the kernel in a known state, and
* don't have to worry about it later.
*/
kill_motor:
push dx
mov dx,#0x3f2
xor al, al
outb
pop dx
ret

sectors:
.word 0

disksizes:
.byte 36,18,15,9

msg1:
.byte 13,10
.ascii "Loading"

.org 497
setup_sects:
.byte SETUPSECS
root_flags:
.word CONFIG_ROOT_RDONLY
syssize:
.word SYSSIZE
swap_dev:
.word SWAP_DEV
ram_size:
.word RAMDISK
vid_mode:
.word SVGA_MODE
root_dev:
.word ROOT_DEV
boot_flag:
.word 0xAA55


어셈러브에서 퍼왔다. 분석은 나중에... ^^;;
참고 사이트 : http://www.asmlove.co.kr/study_gio.htm
Posted by xHuro
,
BabyStep은 포럼에서 CrazyBuddah에 의해 쓰여진 tutorial 시리즈이다. 포럼 thread에서 찾을 수 있다.

간단한 'hello world' 부트섹터부터 보호모드 스위치, 그리고 디스플레이 까지 말한다.
BabyStep1



BabyStep2



BabyStep3



BabyStep4



※ http://www.mega-tokyo.com/osfaq2/index.php/BabyStep 에서 가져왔습니다. 그대로 해석하기 보다는 저가 공부하고 있는 입장에서 저가 보기 편하게 해석했습니다^^
Posted by xHuro
,
http://www.zdnet.co.kr/techupdate/lecture/network/0,39024995,10069466,00.htm

http://nbloger.com/view_post/vw.asp?bidx=232

http://nbloger.com/view_post/vw.asp?bidx=205


http://nbloger.com/view_post/vw.asp?bidx=1077

--- 계속 추가 예정

'개발 끄적임들 > 케케묵어버린 것들' 카테고리의 다른 글

[펌]Example Boot Sector  (0) 2005.07.11
부트로더 만들기.. BabyStep  (2) 2005.07.01
리눅스 바통 넘기기...  (0) 2005.06.13
참고 사이트  (0) 2005.06.07
힘들게 찾아낸 ARM cross-compiler SITE  (2) 2005.06.05
Posted by xHuro
,
요즘 블로그의 대세는 바톤 넘기기인 듯합니다.
음악, 게임, 노래방, 블로그 바톤 넘기기... 외 기타 등등..
참 배경화면 바톤 넘기기도 있던데..
누가 시작했는지는 모르지만...

일요일 저녁...

자다가 일어나 테터센터를 돌고 있는데 문득 생각이 들었네요.
엥? 왜 리눅스 바톤 넘기기는 없지 ㅡ_ㅡ?

그.래.서. 리눅스 바톤 넘기기 5문 5답을 시작합니다!
온라인쪽에 별로 아는 사람들이 없어서, 바통이 제대로 넘어갈 지는 모르겠네요. 그래도 출!발!합니다.

1. 가장 처음으로 사용했던 리눅스 배포판...
제일 처음 사용했던 배포판은 slackware 3.4였다. 98년도 대학 입학하자 마자, 모 동아리 선배의 압박에 못이겨, 거금을 투자하여 리눅스가 있는 시디를 구입했었다. 지금은 안타깝게도 우리나라에서는 거의 사장되어 가는 듯.

2. 가장 최근에 설치했던 리눅스 배포판... 임베디드 관련 수업때, 사용한 slackware 9.1. 다들 redhat 계열을 설치했으나, 무슨 만물상도 아니고 시디에 다 때려넣어놨기에 마음에 안들어서 slackware를 선택했다. (그런데, slackware는 진짜 불친절한 배포판이다. 무슨 말인지 궁금하면, 한번 깔아봐요~. 왜 불친절한가..)
이전에 설치한 ubuntu 5.04와 요사이 빈 하드에 새로이 설치한 suse 9.1. 데스크 탑용으로 쓰려고 두 배포판을 설치했는데, 현재 suse 탐험 계획을 가지고 있다. ubuntu는 live CD 만든다고 한번 미쳐서 설치한 이후 제거되지 않고 있다.

3. 가장 마음에 드는 윈도우 매니저는...
- Qt 공부하면서 KDE가 더 좋아졌다. 뭐 gnome이 싫다는 것도 아니지만, 요즘 친숙한 건 KDE다. 우리나라는 gnome이 대세라고 하던데. 눈치보고 바꿔야지..ㅋ(얼마전 kldp에서 슬쩍 읽은 듯한..)

4. 자주 사용하는 리눅스 프로그램 5가지...
- 처음, 당연히 vi가 제일 많이 사용하지 않을라나? 늘 vi vs. emacs가 논제로 펼쳐지지만(지금도 kldp 어디에서가...) 나 역시 emacs는 너무 어렵다. 요즘 실습 시간에 리눅스 설치해야한다고 하면, emacs는 일단 설치에서 제외 대상 1호가 되어버린다.

- 둘, 나 역시 무늬나마 컴퓨터 공학도(?)로서, gcc 사용 빈도가 높지. 그런데, 컴파일러도 프로그램에 들어가겠지? 프로그램에 안들어 갈라나?

- 셋, 역시 리눅스하면 인터넷. ubuntu를 사용할 때는 firefox를, suse를 사용할 때는 conqurer(철자가 맞나?)를 사용하는데, firefox에게 점수를 더 주고 싶고, 더 자주 사용한다.

- 넷, mplayerxmms. 프로그래밍할 때, 웹서핑할 때 음악이 없으면 무슨 재미로 산다냐?

- 다섯, 헉... 내가 사용하는 프로그램이 이렇게 없었단 말인가. 아~ 방금 머릿 속에서 먼가 지나쳐갔다. gFTP가 있었지. 한글 디렉토리는 제대로 안보는 단점(slackware에서만 그런가?)이 있지만, 손수 console로 접속하는 것보다 훨~씬 편리함을 제공하고 있다.

5. 다음 바통을 이어바으실 분...
자신이 리눅스의 마력에 끌린다고 생각하시는 모든 분들...
리눅스에서 산전수전 다 겪어보신 분들...
자신의 컴에 현재 리눅스가 설치되어 있으신 분들~

감사히 트랙백 받겠습니다! (과연 날라올까 ㅜㅜ)
흠.. 어제 포스트 작성하고 나서 계정이 뻗었다가 (솔직히 저의 불찰입니다 ㅜㅜ) 만 16시간만에 살아났네요 @.@ 그래서 다시 포스팅 합니다 우어~~
Posted by xHuro
,