International Electronics and Technology Forum
May 21, 2012, 01:46:55 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: assembly language code?  (Read 482 times)
gordon
Newbie
*
Posts: 7


« on: July 16, 2011, 06:37:19 AM »

I need a little help with some assembly language coding...

I have to write a program that

Write a program that upon startup writes a #55H to port 2 of the microcontroller and then #AAH to port 2 after 25 mSec and stops. (Oscillator = 29.4MHz)

If you could please help i would greatly appreciate it
Logged
matt_e
Newbie
*
Posts: 3


« Reply #1 on: July 16, 2011, 10:04:14 AM »

You could get it down to 55 mSec using 8086 int 8.
cli
push ds
push 0
pop ds
mov ax, word[ds:8h*4], ivt
mov dx, word[ds:8h*4+2]
mov word[intold], ax
mov word[intold+2], dx
mov word[ds:8h*4], ivt
mov word[ds:8h*4+2], cs
pop ds
sti
ivt:
pushf
pusha
mov al, 0x55
out  2, al
mov al, 0xaa
popf
db 0eah
intold dw 0, 0
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC | Privacy Policy Valid XHTML 1.0! Valid CSS!