Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes to address warnings from the assembler #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/hello98.nas
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
;/////////////////////////////
; プログラム本体
;/////////////////////////////
section .text
entry:
XOR AX,AX ; レジスタ初期化
MOV DS,AX
Expand Down Expand Up @@ -68,7 +67,8 @@ beep:
;I/Oポート 3FDFh にコントロールワードを書き込むことで、
;タイマのモードを設定することができる。
MOV AL,0x76 ;コントロールワード0x76 (ハード-119)
OUT 0x3FDF,AL ;タイマモードを設定
MOV DX,0x3FDF ;タイマモードを設定
OUT DX,AL

MOV DX,0x3FDB ;DXにアドレスを入れてからOUTを2回書かないと動作がおかしい
MOV AL,0x00 ;周波数下位バイト
Expand All @@ -92,7 +92,6 @@ fin:

;-------------------------------------------------
;データセクション
section .data
msg:
DB "Hello world!!"
DB 0x0
Expand Down