Khoa Công Nghệ Thông Tin -Khóa XIII-Lớp TH0702
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Khoa Công Nghệ Thông Tin -Khóa XIII-Lớp TH0702

Hân Hạnh Chào Đón Tất Cả Các Bạn
 
Trang ChínhPortalGalleryLatest imagesTìm kiếmĐăng kýĐăng Nhập

 

 Assembly - Compile file .asm

Go down 
+3
bichi_bido
@.@_nombas
=Xme=
7 posters
Tác giảThông điệp
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Nov 18, 2008 11:02 am

Chưa bao giờ compile file .asm ư , hay chạy thử rồi mà bó tay m006 . "Tìm 1 con đường , tìm 1 lối diiiiii .... " , đi đâu bi giờ ,thôi ghé vào đây tớ hướng dẫn cho lẹ m009 heheheh

******************************************* COMPILE .ASM **************************************

Trước khi thực hiện những bước sau thì bạn cần phải có đồ hành nghề đã hehe ASM full - Lụm nó về nào
Ok đủ rồi , action !!

1. Tất nhiên muốn compile dc thì bạn phải có 1 file .asm rồi ^ ^(mình lấy code bài nhập 1 ký tự và in ra ký tự vừa nhập)
(1 ví dụ nhá )
Assembly  - Compile file .asm Step1
==>và chúng ta có dc cái nài
Assembly  - Compile file .asm Result1

2. Ok , sau bước tất yếu trên , bạn đã có được file .asm được chứa chung folder với 1 file chính là MASM và LINK
-Giờ bạn vào hộp thoại run , nhập cmd/enter .
-Và di chuyển đến folder chứa file .asm (cũng như MASM và LINK)
note : để move wa ổ khác bạn chỉ cần ghi c: hoặc d: , để move wa folder dùng keyword cd và sau đó là address của file cần compile
Assembly  - Compile file .asm Step2

3. Bước tiếp theo , bạn dùng file MASM compile file .asm để tạo ra file .obj
Assembly  - Compile file .asm Step3

4. Sau khi đã có được file .obj , bạn lại dùng LINK compile .obj thành file .exe (file .exe là file thực thi code mà bạn mong muốn )
Assembly  - Compile file .asm Step4

5. Ok mọi thứ coi như xong rồi , bây giờ bạn đã có được file .exe , bạn chỉ cần chạy nó (bằng cách ghi tên nó ra )
Assembly  - Compile file .asm Step5

6. Quay lại đây spam nếu như còn gì ....thắc mắc m98

note :
- Mỗi lần MASM hoặc LINK ,bạn có thể chí cần ghi tên file là đủ , ko cần phần đuôi (vì làm hướng dẫn nên mình ghi hơi kỹ ) .
- Khi di chuyển sang thư mục , nếu không nhớ chính xác tên thư mục , bạn chỉ cần ghi vài ký tự bắt đầu , sau đó nhấn Tab thì tên đầy đủ của thư mục sẽ sổ ra .

******************************************* GOOD LUCK *************************************
Về Đầu Trang Go down
@.@_nombas
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
@.@_nombas


Nữ
Tổng số bài gửi : 36
Age : 34
Đến từ : lòng đáy biển^o^
Registration date : 15/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Nov 18, 2008 9:33 pm

hay wo' , hay wo' m015 , mi mốt , mí môn khác cũng post cách chạy như dzậy hen bạn yu ,hậu tạ nhìu nhìu, hehe m107
Về Đầu Trang Go down
bichi_bido
Thành Viên Cấp 1
Thành Viên Cấp 1
bichi_bido


Tổng số bài gửi : 14
Registration date : 14/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Nov 18, 2008 10:03 pm

m004 m007 m022 hay qua, hay lam ,rat hay blah blah ( e bi ep phai cm, huhuhu)
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Nov 18, 2008 10:15 pm

bichi_bido đã viết:
m004 m007 m022 hay qua, hay lam ,rat hay blah blah ( e bi ep phai cm, huhuhu)
lộ liễu quá m014 m014 m014 m016 m016 m016 m016 m016
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Nov 20, 2008 10:49 pm

Thank nhìu !!! làm đc rùi !! m009


Được sửa bởi nickcool ngày Thu Nov 20, 2008 10:58 pm; sửa lần 1.
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Nov 20, 2008 10:57 pm

Ok , ở bước đó nó đang hỏi bạn muốn đặt tên gì cho file .obj ,bạn thích có thể đặt 1 tên khác (gõ tên vào và..enter ^ ^! ) . Còn nếu bạn không ghi gì hết và gõ enter , thì default name của file .obj sẽ được lấy theo tên của file .asm (in hoa , và bạn cũng chú ý , tên in hoa với in thường , mình gọi nó ra , thì hình như cũng như nhau , bạn test lại thử xem sao ^ ^ ) . Good luck !
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 03, 2008 2:08 pm

bạn ơi cho hỏi làm sao các lệnh khác nhau trong edit plus có màu khác nhau
giống như trong hỉnh của bạn ah'.
thank.
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 03, 2008 9:33 pm

Cái đó là mình dùng editor Notepad ++ , hỗ trợ 47 loại ngôn ngữ lập trình , trong box này mình cũng có giới thiệu đó , nếu mún bạn có thể vào và Down :D
Về Đầu Trang Go down
Ice
Thành Viên Cấp 1
Thành Viên Cấp 1
Ice


Tổng số bài gửi : 29
Registration date : 18/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 04, 2008 6:32 pm

Danh mylove trong google ra một đống
Photobucket
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 04, 2008 10:14 pm

Cái mà bạn tìm thấy là MyLove của người khác , còn MyLove của mình thì google tìm ko ra đâu hehehe
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 04, 2008 10:28 pm

mình dow rùi nhưng các kí tự chỉ có 1 màu thoy m003
chỉnh như thế nào vậy ???
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 04, 2008 11:14 pm

Bạn clik vào button "Language" , nó sẽ xuất hiện 1 list các danh sách ngôn ngữ lập trình , bạn chọn ASSEMBLER . GL
Về Đầu Trang Go down
guanweifu
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
guanweifu


Tổng số bài gửi : 24
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 10, 2008 9:45 am

Assembly  - Compile file .asm Assembler_and_virtual_8086_hardware_for_emu_8086Cái này dùng để chạy asm mà ông thầy có show qua - không biết post chưa ???
-> emu8086 có thể compilerun step lun m016

-> Ai không muốn chạy cách trên thì xài cái này ............... m021

Download_Emu8086
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 10, 2008 11:24 am

Nice dey' , cho cái code robo + chỉ dẫn để test lun thử xem nào Phú :D
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 10, 2008 9:28 pm

Đúng rùi đó, cái phần giao diện viết sao vậy?? chĩ a e với ^^.
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Dec 16, 2008 9:58 am

@ Xme:
mình complite
Assembly  - Compile file .asm EDIT-1thì nó ra như thế này
Assembly  - Compile file .asm DOS-1
code:
.MODEL SMALL
.STACK 100H
.DATA
MES1 DB "DEY LA MES 1","$"
MES2 DB "DEY LA MES 2","$"
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX

MOV AH,9
MOV DX,OFFSET MES1
MOV DX,OFFSET MES2
INT 21H

MAIN ENDP
END MAIN
luk đầu run hoc.exe hok dc, run nhap.exe sau đó run hoc.exe thì có lỗi(ở phía sau ah')
helf me!!
thank !!!!
Về Đầu Trang Go down
nhim_lanna
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nhim_lanna


Nữ
Tổng số bài gửi : 13
Age : 35
Đến từ : bóng đêm
Job/hobbies : ngủ
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Dec 16, 2008 1:35 pm

cho hỏi cái nì với :

trong run \ cmp , mà đang chạy debug (C:\>debug ) ---> mun tat che độ debug để chay asm như bình thường thì dùng cú pháp ntn zạ???
m002 m002 m002
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeTue Dec 16, 2008 1:45 pm

bạn gõ tên ổ cần chạy vào, mún open cái nào thì cứ theo thư mục mà đánh ah'.
ex: đang từ ổ C, mún wa ổ E(chứa file asm) thì đánh 'E:'
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 17, 2008 10:47 pm

2 dòng lệnh này :
MOV AH,4CH
INT 21H
có nghĩa là gì vậy ????
nó dùng để làm zì ????
m001 m001 m001 m001
Về Đầu Trang Go down
@.@_nombas
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
@.@_nombas


Nữ
Tổng số bài gửi : 36
Age : 34
Đến từ : lòng đáy biển^o^
Registration date : 15/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeWed Dec 17, 2008 11:03 pm

do bạn xme gặp sự cố về kỹ thuật , nên hem reply dc , mong các bạn thông củm và tha tội cho bạn xme, amen m003 m003 m003 m003
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 18, 2008 1:02 pm

nickcool đã viết:
2 dòng lệnh này :
MOV AH,4CH
INT 21H
có nghĩa là gì vậy ????
nó dùng để làm zì ????
m001 m001 m001 m001

2 lệnh đó dùng để "Exit to Dos "
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 18, 2008 1:06 pm

nhim_lanna đã viết:
cho hỏi cái nì với :

trong run \ cmp , mà đang chạy debug (C:\>debug ) ---> mun tat che độ debug để chay asm như bình thường thì dùng cú pháp ntn zạ???
m002 m002 m002

Lan muốn thoát chế độ debug thì gõ "Q" , xong rồi muốn move wa ổ nào thì move ("C: ,D:" , còn di chuyển trong thư mục thì "cd address") , good luck ^ ^
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeThu Dec 18, 2008 1:36 pm

nickcool đã viết:
@ Xme:
.MODEL SMALL
.STACK 100H
.DATA
MES1 DB "DEY LA MES 1","$"
MES2 DB "DEY LA MES 2","$"
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX

MOV AH,9
MOV DX,OFFSET MES1
MOV DX,OFFSET MES2
INT 21H

MAIN ENDP
END MAIN
luk đầu run hoc.exe hok dc, run nhap.exe sau đó run hoc.exe thì có lỗi(ở phía sau ah')
helf me!!
thank !!!!

CODE của bạn thiếu phần Exit to dos in để in ra kết quả (MOV AH,4CH ;INT 21H ) mà nếu in ra thì nó chỉ in ra MES2 thôi , vì bạn chép đè offset mes2 vào trươc khi xuất ra mes1 (mún in ra 2 mes thì gọi 2 lần MOV AH,9)
Về Đầu Trang Go down
nickcool
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
nickcool


Nam
Tổng số bài gửi : 112
Age : 34
Đến từ : Nơi sự sống bắt đầu
Registration date : 19/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeFri Dec 19, 2008 8:31 pm

Thank pác nhìu lém
m10 m10 m10 m10
Về Đầu Trang Go down
=Xme=
Super Mod - Quản Trị Viên
Super Mod - Quản Trị Viên
=Xme=


Tổng số bài gửi : 156
Age : 36
Đến từ : no*i tinh` iu bat' dau` ~^ ^~
Registration date : 13/11/2008

Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitimeSun Dec 21, 2008 9:19 am

Thật ra cũng không có gì đâu , nhờ vậy mình cũng ôn bài lại , có ích 2 chiều mà , nên rất sẵn lòng m10 m10
Về Đầu Trang Go down
Sponsored content





Assembly  - Compile file .asm Empty
Bài gửiTiêu đề: Re: Assembly - Compile file .asm   Assembly  - Compile file .asm I_icon_minitime

Về Đầu Trang Go down
 
Assembly - Compile file .asm
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» Cấu Trúc và Hợp Ngữ Máy Tính - Thầy Nguyên
» Assembly update ngày 9/12
» Bài tập CTDL
» [SHARE]Assembly - Có ai có bài giải không , cho tớ tham khảo tí :D
» Xu hướng virus ghi đè file hệ thống

Permissions in this forum:Bạn không có quyền trả lời bài viết
Khoa Công Nghệ Thông Tin -Khóa XIII-Lớp TH0702 :: Khu Chia Sẽ Kiến Thức :: Lập Trình-
Chuyển đến