커널 부트로더 제작중 link에러

intmain1202의 이미지

LINK : fatal error L1022: response line too long

부트로더에서 c로 점프할려고합니다.
그런데 link에러가 나는데요
제가알기론 64kb를 넘어가면 점프가안된다? 이런말을 본것같은데.. 그래서 안되는건가요

far점프로하면.. 그냥 빌드오류라고 나오네요..

near점프와 far점프의 차이점이 무엇인가요?!
책에서는 대충적혀져잇는데 near포인터는 데이터세그먼트 시작부터의 32비트 오프셋이고
far포인터는 32비트 세그먼트-오프셋주소 라고 되어있는데..
어떨때 near을 사용하는것이고 어떨때 far을 사용하는것입니까?

아래는 소스입니다..
왜LINK : fatal error L1022: response line too long 같은 오류가 생기는지.. 좀 아시는분있으신가요.
.386p
.MODEL FLAT

public _EntryPoint16
extern _SYNCOS_MAIN:near

.CODE
_EntryPoint16 PROC NEAR
mov eax, 07E0h
push word ptr ax
mov eax, offset init
push word ptr ax
retf
init:
; Set DS and ES to the data segment.
MOV AX, CS
MOV DS, AX
MOV ES, AX
MOV SS, AX

mov dx, 3F2h ;플로피디스크를 끈다.
xor al, al
out dx, al

CLI ;인터럽트를 해제시킨다.
mov al, 0FFh
out 0A1h, al

db 3eh ; LGDT 명령어 기계어
db 67h
db 0fh
db 01h
db 15h
dd GDT-7E00h

mov eax, cr0 ; protected Mode 진입
or al, 1
mov cr0, eax
jmp $+2
nop
nop

db 66h ; FARJMP를 해서 CS레지스터에 CS SEGMNET DESCRIPTOR를 넣는다.
db 0eah
dd EntryPoint32
dw 08h


finish:
HLT ;정지시킨다. 인터럽트가 발생하게되면 동작.
jmp finish

_EntryPoint16 ENDP
EntryPoint32 PROC NEAR
mov ax, 10h ; ds segment descriptor
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov esp, 1ffffh

call _SYNCOS_MAIN
finish:
hlt
jmp finish
EntryPoint32 ENDP

.DATA
;===============================================================================
; GDT table descriptor
;===============================================================================
GDT_DESCR STRUCT
GDTRDESC dw GDT_SIZE -1
dd GDT
GDT_DESCR ENDS

;===============================================================================
; GDT table
;===============================================================================
;----------------------------------
; GDT TABLE INDEX #0
; INDEX : NULL SELECTOR
;----------------------------------
GDT dd 0
dd 0
;----------------------------------
; GDT TABLE INDEX #1
; INDEX : 0x0008h
; TYPE : CODE SEGMENT
; RING LEVEL : 0
; ATTRIBUTES : Excute/Read, Nonconforming, 4GB
;----------------------------------
dw 0ffffh ; segment limit 15:00
dw 0000h ; base address 15:00
db 00h ; base address 23:16
db 10011010b ; P | DPL | S | TYPE
db 11001111b ; G | D/B | 0 | AVL | segment limit 19:16
db 00h ; base address 31:24

;----------------------------------
; GDT TABLE INDEX #2
; INDEX : 0x0010h
; TYPE : DATA SEGMENT
; RING LEVEL : 0
; ATTRIBUTES : Read/Write, 4GB
;----------------------------------
dw 0ffffh
dw 0000h
db 00h
db 10010010b
db 11001111b
db 00h

GDT_SIZE EQU $-GDT

msg_loader db "kernel loading...", 0h

END

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.