Print a number in NASM - building an x86 Bootsector
问题 I just started messing around with assembly language and I tried to print the number 9 on console. Here is what I wrote: global _main section .data digit equ 9 section .bss section .text _main: mov edx, 1 mov ecx, digit add ecx, 48 mov ebx, 1 mov eax, 4 int 21h ret I know I can do it using extern _printf but I want try it with interrupts. I thought 21h is a windows interrupt. So, what interrupt code should I use? 回答1: Here's an example from a course that I teach. This is a raw bootsector that