org 07c00h ; P
mov ax, cs
mov ds, ax
mov es, ax
call STR; Call display string routine
JMP $;
> BBSTR :
mov ax, BootMessage
mov bp, ax; ES:BP = string address
mov cx, 16; CX = string length
mov ax, 01301h; AH = 13, AL = 01h
mov bx, 000ch; BL = 0Ch, highlighted)
mov dl, 0
int 10h; BootMessage: db “Hello, OS world!” BootMessage: db “Hello, OS world!
times 510-($-$$) db 0 ; Fill the remaining space so that the generated binary code is exactly 512 bytes
dw 0xaa55; End flag
mov ax, cs
mov ds, ax
mov es, ax
call STR; Call display string routine
JMP $;
> BBSTR :
mov ax, BootMessage
mov bp, ax; ES:BP = string address
mov cx, 16; CX = string length
mov ax, 01301h; AH = 13, AL = 01h
mov bx, 000ch; BL = 0Ch, highlighted)
mov dl, 0
int 10h; BootMessage: db “Hello, OS world!” BootMessage: db “Hello, OS world!
times 510-($-$$) db 0 ; Fill the remaining space so that the generated binary code is exactly 512 bytes
dw 0xaa55; End flag
To compile into an executable program under Linux, use the command:
Nasm-f ELF pmboot.asm -o pmboot.bin
Compiler error:
The boot. The asm: 1: error: parser: instruction is expected
Use the command nasm pmboot.asm -o pmboot.bin without error.
Read More:
- It: instruction of arm assembly instruction
- How to Fix Parser rerror: error tokenizing data. C error: expected 2 fields in line 53, saw 3
- After node.js is installed, use the instruction node version in vscode to show that it is not an external or internal instruction. The solution is as follows:
- Ida assembly instruction invalid operate
- The solution of default boot device missing or boot failed appears on the blue screen of Lenovo xiaoxinchao 7000
- Mac boot boot the most detailed explanation, so that the automatic start of the program can not escape
- Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.4.0:repackage failed
- Cannot find module ‘body-parser’
- Mybatis custom list collection parser
- Arm assembly instruction ADS1.2 reports an error unknown opcode
- Ida batch processes virus share samples to obtain ASM files and bytes files
- Android Cannot merge new index 67208 into a non-jumbo instruction
- Spring boot problem 1: error reporting life processing instructions for building a spring boot project
- An error occurred when MySQL backup with mysqldump instruction in MacOS system
- ASP.NET Parser Error Message: Could not load type ‘Web.Global’.
- Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block collection
- com.alibaba.druid.sql.parser.ParserException: syntax error
- Error handling of apt instruction e: unmet dependencies. Try ‘apt — fix broken install’ with no packages in Ubuntu 20.04
- Python: How to Fix “Ord() expected string of length 1, but int found”
- Error ts1005: ‘;’ expected