English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Please provide me atleast three sample program of assembly language using interrupt 21h or int 21h.

2007-09-28 19:12:18 · 2 answers · asked by bridjE 1 in Computers & Internet Programming & Design

2 answers

Well if they're using int 21h they're probably on a PC writing for DOS. int 21h calls most the basic DOS functions.

But it does so many I would like to know what they would like to do?

2007-09-28 21:01:52 · answer #1 · answered by Anonymous · 0 0

Not knowing which CPU nor assembler you use, you can't get a "sample": assembly is chip and manufacturer dependant.
In your code, you would have something like this:

; VECTORS
; ------------------------------------------
CSEG
ORG 0h ; reset
ajmp Start
ORG 21h ; Interrupt vector
ajmp Interrupt
; ------------------------------------------
Start:
mov sp, #080h ; initialise stack pointer
....
Interrupt: ; your interrupt routine
jnb Txflag, pcint1 ; currently sending to PC
clr BitA
...
RETI ; return from interrupt.
; -------------------------
Google the chip manufacturer (i.e. above was for ATMEL micro series).
Get data sheets of the chip from manufacturer
Often, they have samples of applications, in ASM.
Good luck!

2007-09-29 03:21:39 · answer #2 · answered by just "JR" 7 · 0 0

fedest.com, questions and answers