日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

汇编解析(3)-nasm基础、物理地址

發布時間:2025/3/12 编程问答 16 豆豆
生活随笔 收集整理的這篇文章主要介紹了 汇编解析(3)-nasm基础、物理地址 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、8086生成物理地址:
段寄存器左移4位形成20位段地址,十六進制左移1位,然后加上16位偏移地址,合成物理地址
物理地址可在8086的20位地址總線上傳遞并尋址。
2、進制表示
0x開頭或H結尾:16進制,如:0x3f、3fH
B結尾:2進制,如:01010000B
3、nasm:
nasm:需要一系列參數才能正常工作。
-f 參數的作用是指定輸出文件的格式
-f bin 要求nasm生成的文件只包含純二進制的mkwpw,無損作系統所需要的加載和重定位信息
-o 指定編譯后輸出的文件名
更多說明如下:

To assemble a file, you issue a command of the form nasm -f <format> <filename> [-o <output>] For example, nasm -f elf myfile.asm will assemble myfile.asm into an ELF object file myfile.o. And nasm -f bin myfile.asm -o myfile.com will assemble myfile.asm into a raw binary file myfile.com. To produce a listing file, with the hex codes output from NASM displayed on the left of the original sources, use the -l option to give a listing file name, for example: nasm -f coff myfile.asm -l myfile.lst To get further usage instructions from NASM, try typing nasm -h The option --help is an alias for the -h option. If you use Linux but aren’t sure whether your system is a.out or ELF, type file nasm (in the directory in which you put the NASM binary when you installed it). If it says something like nasm: ELF 32-bit LSB executable i386 (386 and up) Version 1 then your system is ELF, and you should use the option -f elf when you want NASM to produce Linux object files. If it says nasm: Linux/i386 demand-paged executable (QMAGIC) or something similar, your system is a.out, and you should use -f aout instead (Linux a.out systems have long been obsolete, and are rare these days.) Like Unix compilers and assemblers, NASM is silent unless it goes wrong: you won’t see any output at all, unless it gives error messages.-f format select output file formatbin Flat raw binary (MS-DOS, embedded, ...) [default]ith Intel Hex encoded flat binarysrec Motorola S-records encoded flat binaryaout Linux a.outaoutb NetBSD/FreeBSD a.outcoff COFF (i386) (DJGPP, some Unix variants)elf32 ELF32 (i386) (Linux, most Unix variants)elf64 ELF64 (x86-64) (Linux, most Unix variants)elfx32 ELFx32 (ELF32 for x86-64) (Linux)as86 as86 (bin86/dev86 toolchain)obj Intel/Microsoft OMF (MS-DOS, OS/2, Win16)win32 Microsoft extended COFF for Win32 (i386)win64 Microsoft extended COFF for Win64 (x86-64)rdf Relocatable Dynamic Object File Format v2.0ieee IEEE-695 (LADsoft variant) object file formatmacho32 Mach-O i386 (Mach, including MacOS X and variants)macho64 Mach-O x86-64 (Mach, including MacOS X and variants)dbg Trace of all info passed to output stageelf Legacy alias for "elf32"macho Legacy alias for "macho32"win Legacy alias for "win32"

hello,world例子

(base) [myhaspl@localhost nasm]$ cat test.asm section .data ;section declaration msg db "Hello, world!",0xA ;our dear string len equ $ - msg ;length of our dear string section .text ;section declaration;we must export the entry point to the ELF linker orglobal _start ;loader. They conventionally recognize _start as their;entry point. Use ld -e foo to override the default. _start: ;write our string to stdoutmov eax,4 ;system call number (sys_write)mov ebx,1 ;first argument: file handle (stdout)mov ecx,msg ;second argument: pointer to message to writemov edx,len ;third argument: message lengthint 0x80 ;call kernel ;and exitmov eax,1 ;system call number (sys_exit)xor ebx,ebx ;first syscall argument: exit codeint 0x80 ;call kernel (base) [myhaspl@localhost nasm]$ (base) [myhaspl@localhost nasm]$ nasm -f elf64 test.asm (base) [myhaspl@localhost nasm]$ ls test.asm test.o (base) [myhaspl@localhost nasm]$ ld -s -o test test.o (base) [myhaspl@localhost nasm]$ ls test test.asm test.o (base) [myhaspl@localhost nasm]$ ./test Hello, world!

4、基本輸入輸出系統(BIOS)

總結

以上是生活随笔為你收集整理的汇编解析(3)-nasm基础、物理地址的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 双性娇喘浑圆奶水h男男漫画 | 色呦呦一区二区三区 | 美女被男生免费视频 | 欧美乱论视频 | 视频二区中文字幕 | 日韩精品中文字幕一区二区 | 久久偷拍免费视频 | 日韩性欧美| 国产a区| 香蕉污视频在线观看 | 动漫av一区二区三区 | 国产在线网址 | 超碰免费av | 伊人性视频| av国产精品 | 日本夫妻性生活视频 | 嫩草99| 免费网站av | jizz精品| 中文字幕天堂在线 | 强侵犯の奶水授乳羞羞漫虐 | 精品午夜一区二区 | 交视频在线播放 | 小黄网站在线观看 | 一区二区高清在线 | 麻豆91在线播放 | 色噜噜噜| 国产成人免费视频 | 手机看片福利久久 | 男人透女人免费视频 | 免费成人在线看 | 免费在线观看av片 | 五月色丁香 | 久久久久久久久久久久久久久久久 | 美景之屋电影免费高清完整韩剧 | 久久久18禁一区二区三区精品 | 色综合久久久久综合体桃花网 | 91成人免费在线视频 | 青青草国产精品 | 日韩中文一区 | 国精产品一区二区三区 | 日日夜夜添 | 伊人久久婷婷 | 久久午夜影视 | 向日葵视频在线播放 | 美女户外露出 | 手机看片日韩日韩 | 污片在线看 | 蜜桃av影院 | 美女久久久久久久久 | 视频一区国产 | 密臀av在线播放 | 草草影院av | 国产伦精品一区二区三区千人斩 | 中文字幕精品久久 | 秋霞精品一区二区三区 | 免费观看一区二区 | 内射干少妇亚洲69xxx | 97视频久久久| 全黄毛片 | 天天做天天爱天天爽 | 精品国模一区二区三区欧美 | 岛国a视频| 欧美一级片在线 | 丁香花五月天 | 综合五月 | 男人的天堂网av | 看免费的毛片 | 又色又爽又黄无遮挡的免费视频 | 欧美性猛交xxxx乱大交3 | 毛片毛片毛片毛片毛片毛片毛片毛片 | 欧美jizzhd精品欧美18 | 成人毛毛片 | 五月婷婷丁香久久 | 亚洲高清视频一区二区 | jizz欧美性11 | 嫩草影院黄 | 自拍偷拍亚洲综合 | 精品国产xxx | av国产在线观看 | 亚洲高清视频在线播放 | 找av导航 | 欧美,日韩,国产在线 | www.日本在线观看 | 国产伦子伦对白视频 | 牛牛av国产一区二区 | 国产精品自拍在线观看 | 成人网址在线观看 | 美女露隐私网站 | 中文字幕一区二区在线播放 | 欧美人与性禽动交精品 | 在线看的av网站 | 国产又黄又粗又猛又爽的视频 | 国产在线视频在线观看 | 亚洲 小说区 图片区 都市 | 美女三级黄色片 | 亚洲av成人精品毛片 | 痴汉电车在线观看 | 夜夜操夜夜干 |