Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to implement hello world of subroutine 9 in int 21h interrupt routine in assembler basis

Shulou Source: shulou.com Published: 2022-06-01 11:31:32 09月26日 Update

Assemble the basis of int 21h interrupt routine in the No. 9 subroutine how to achieve hello world, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.

     IDE: Masm for Windows Integrated Experimental Environment 2015

    OS: Windows 10 x64

Typesetting: Markdown

  

Codedatas segment; segment code db 'hello world','$'; $is not displayed, but to be used as the end flag to display a string, there must be a datas endsstacks segment; stack segment code stacks endscodes segment assume cs:codes,ds:datas,ss:stacksstart: mov ax,datas mov ds,ax mov ah,2; set mov bh,0 to place the cursor; 0 page mov dh,5 5-line mov dl,12; 12 columns of int 10h; call the subroutine mov dx,0 mov ah,9 in the int 10h interrupt routine; call the ninth subroutine in the int 21h interrupt routine, in fact, it is better to call it a function int 21h mov ah,4ch int 21hcodes ends end start; as long as you read carefully, this code can be understood. Those who study by themselves, come on. Debug

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Code subroutines help subroutines foundations programs clarity cursors content functions stacks characters strings this data articles novices more flags environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Microsoft Apple MySQL MariaDB