8000 第18话 运行启动扇区外的程序 关于栈段使用的问题 · Issue #3 · tanyugang/CodingMaster · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
第18话 运行启动扇区外的程序 关于栈段使用的问题 #3
Open
@RyanHe123

Description

@RyanHe123

CodeStart:
mov ax, [DataSeg]
mov ds, ax
xor si, si
call PrintString
jmp $

在Program.asm中预留了128字节作为栈段,但是在程序运行过程中,仍然使用的是原有的栈区,并没有使用创建好的栈段。是否可以通过添加以下代码的方式,修改栈?

CodeStart:
  mov bx, [StackSeg]
  mov ss, bx
  mov sp, 128
  mov ax, [DataSeg]
  mov ds, ax
  xor si, si

  call PrintString
  jmp $

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0