組合語言 環境安裝及各個暫存器介紹

2022-08-17 01:54:08 字數 1724 閱讀 6979

建立乙個編譯彙編檔案的資料夾

下面是簡單效果圖:

在我們每次開啟dosbox的時候,都要這麼麻煩對其c盤檔案進行設定(mount c /users/your name/documents/assembly),這不是很麻煩的事情嗎?這個我們檢視readme檔案,發現了下面的話:

is automatically created the

first

time you run dosbox.

the file can be found in:

(windows) "start/winlogo menu"->"all programs"->dosbox-0.74->options

(linux) ~/.dosbox/dosbox-0.74.conf

(mac os x) "~/library/preferences/dosbox 0.74 preferences"

the file

is divided into several sections. each section starts with a

[section name] line. the settings are the

property=value lines where value can

be altered to customize dosbox.

# and % indicate comment-lines.

因此,我們只要根據路徑『~/library/preferences/dosbox 0.74 preferences』,開啟偏好設定檔案,在最後位置鍵入

[autoexec]

# lines in this section will be run at startup.

# you can put your mount lines here.

mount c /users/your name/documents/assembly

set path=z:;c:

c:

那麼,每次執行dosbox的時候,我們就可以不再重新設定c盤路徑了。

路徑中的your name,改成你自己的帳號名。

ax,bx,cx,dx 稱作為資料暫存器:

ax (accumulator):累加暫存器,也稱之為累加器;

cx (count):計數器暫存器;

dx (data):資料暫存器;

sp (stack pointer):堆疊指標暫存器;

bp (base pointer):基指標暫存器;

si (source index):源變址暫存器;

di (destination index):目的變址暫存器;

ip (instruction pointer):指令指標暫存器;

flag:標誌暫存器;

cs (code segment):**段暫存器;

ds (data segment):資料段暫存器;

ss (stack segment):堆疊段暫存器;

es (extra segment):附加段暫存器;

組合語言 暫存器

乙個典型的cpu由運算器 控制器 暫存器等器件組成,這些器件靠內部匯流排相連。通用暫存器 ax bx cx dx 段位址暫存器 cs ds es ss 專用暫存器 bp sp si di 指令指標暫存器 ip 標誌暫存器 psw ah al ax accumulator 累加暫存器 bh bl bx...

組合語言 暫存器

乙個cpu由暫存器,運算器,控制器組成,暫存器負責儲存資料。通用暫存器 ax,bx,cx,dx。8086cpu的暫存器都是16位的,能存放兩個位元組。乙個暫存器又能分為兩個部分,乙個高位位元組如ah,還有乙個地位位元組如al。這兩個部分可以單獨看成乙個八位暫存器來用。當暫存器當整體來看時,它可以進行...

組合語言 暫存器

ax,bx,cx,dx 這4個暫存器通常用來存放一般性的資料,被稱為通用暫存器。8086cpu這5個暫存器都可以分為兩個可以獨立使用的8位暫存器來用 ax的低8位 0 7 構成al暫存器,高8位 8 15 構成了ah暫存器。ah和al暫存器是可以獨立使用的8位暫存器。考慮相容性8086cpu可以一次...