日韩性视频-久久久蜜桃-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基础、物理地址的全部內容,希望文章能夠幫你解決所遇到的問題。

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

主站蜘蛛池模板: 日本乱论视频 | 高清视频在线播放 | 三级中文字幕 | 黄色av免费播放 | 又黄又色的网站 | 色无极亚洲色图 | 国产传媒一级片 | 欧美一区二区三区精品 | 中国精品久久久 | 色呦呦一区二区三区 | 国产一级视频免费观看 | 一区二区三区在线观看免费视频 | 无码一区二区三区免费 | 国产经典一区 | 狼干综合 | 欧洲免费毛片 | 国产第四页| 国内精品视频 | 高清av网站| 中国毛片在线 | 久久久无码18禁高潮喷水 | 中文字幕在线看片 | 亚洲欧美另类一区 | 国产成人欧美 | 日日摸日日碰 | 欧美性生活一区 | av中文字幕免费在线观看 | 能在线观看的av网站 | 一区二区三区免费网站 | 五月天黄色网址 | 中国浓毛少妇毛茸茸 | 欧美少妇一区 | 毛片在线观看网站 | 欧美黄页 | 欧洲综合视频 | 国产v亚洲 | 亚洲无码高清精品 | 中文字幕免费高清在线 | 中文字幕免费高清在线观看 | 欧美色插 | 国产精品人人妻人人爽人人牛 | 中文字幕av一区 | 一本大道东京热无码 | caopeng在线视频 | 中国老熟妇自拍hd发布 | 久久岛国 | 国产精品500部 | 精品啪啪 | 男女激情大尺度做爰视频 | 在线观看的网站 | 欧美日韩精品中文字幕 | 日韩欧美国产激情 | 国产精品老女人 | 久久男人的天堂 | 日韩欧美在线视频观看 | 日日噜噜夜夜爽爽 | 一本大道综合伊人精品热热 | 欧美一级视频免费观看 | 亚洲欧美日韩久久 | 伊人综合影院 | 精品96久久久久久中文字幕无 | 日本小视频网站 | 激情婷婷小说 | 国产剧情av在线 | 国产小视频网址 | 日本福利片在线观看 | 72成人网 | 天堂网www. | 亚洲精品激情 | 久久久久无码国产精品一区 | 红桃视频一区二区三区免费 | 国产精品日日摸天天碰 | 亚洲成av人影院 | 中午字幕在线观看 | 天天爽| 成人黄色在线播放 | 日韩精品www| ww成人| 8090av| 成人www.| 动漫美女被到爽流 | 在线黄色观看 | 欧美第一网站 | 欧美日韩一二三区 | 在线不卡av | 黄色网页在线看 | 国产精品黄色片 | 国产精品无码一区二区桃花视频 | 日韩成人激情 | 男生和女生差差的视频 | 国产美女精品久久 | 天天干夜夜怕 | 免费看亚洲 | 亚洲成年 | 国产高清视频免费在线观看 | 欧美激情一区二区三区在线 | 国产一区视频在线 | 国产欧美一区二区在线 | 尤物综合网 |