[Assembly] The simplest assembler: to clear the screen (.asm source code)

Project environment
  • Compilation environment: build a nasm2.8 compilation environment.
  • Mirror file: use winhex_18.2 to brush in the code.
  • Virtual machine: Bochs-2.4.5 is used .
Project software
Program introduction

The realization of assembly language clearing function.

Procedural thinking

If you want to clear the screen, then all blanks, whites, and blacks are required.

Program source code (.asm)
org 0x7c00

    mov ax,cs
    mov ss,ax
    mov sp,0x7c00  ;set stack and sp

    mov ah,0x06
    mov al,0

    mov ch,0  ;(0,0)
    mov cl,0
    mov dh,24  ;(24,79)
    mov dl,79
    mov bh,0x07 ;黑底白字
    int 0x10

@1:
    jmp @1

Guess you like

Origin blog.csdn.net/Gyangxixi/article/details/113611043