CrazyEngineers Forum

******************************************
Welcome To CrazyEngineers (CE) – an online community of engineers from all over the world! With the younger CEan at 84 and the youngest at 16, CE boasts of professional engineers, students, professors, entrepreneurs, CEOs, geeks & nerds. We exchange innovative ideas, share knowledge, help each other and expand our worldwide network of engineers! You need not have a formal degree in engineering to be a part of CrazyEngineers! Need we say more?
Join CE! | Be a CE Ambassador! | Forgot password? | Sponsor CE | Contact Us
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Computer Science & IT Engineering
Reply

  #1 (permalink)
Old 13th August 2008, 06:37 PM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Masm Parallel Port Need Help Badly...

I really need some help with regards to this program.. Me and my classmate have written this program before but its such a long time and have forgotten the code.. Please help me by putting some comments on it.. And it does not run but does not have errors on it... Use to light leds using parallel port using masm programming assembly language help me please...

Code:
.model small
.stack
.code

mov dx,0378h
mov cx,60000

mov bl, 1

start:

bitis:
mov ax,16 ; bitis on
out dx,ax
loop bitis

off0:
mov ax,00
out dx,ax
loop off0

on:
mov ax,48 ; bitis and 1st
out dx,ax
loop on

off:
mov ax,00
out dx,ax
loop off

on2:
mov ax,80 ; bitis and 2nd
out dx,ax
loop on2

off2:
mov ax,00
out dx,ax
loop off2

on3:
mov ax,144 ; bitis and 3rd
out dx,ax
loop on3

off3:
mov ax,00
out dx,ax
loop off3

on4:
mov ax,240 ; all on
out dx,ax
loop on4

off4:
mov ax,00
out dx,ax
loop off4

all:
mov ax,144 ; bitis and 3rd
out dx,ax
loop all

off5:
mov ax,00
out dx,ax
loop off5

on6:
mov ax,80 ; bitis and 2nd
out dx,ax
loop on6

off6:
mov ax,00
out dx,ax
loop off6

on7:
mov ax,48 ; bitis and 1st
out dx,ax
loop on7

off7:
mov ax,00
out dx,ax
loop off7

on8:
mov ax,16 ; bitis
out dx,ax
loop on8

off8:
mov ax,00
out dx,ax
loop off8

on9:
mov ax,240 ; all on
out dx,ax
loop on9

off9:
mov ax,00
out dx,ax
loop off9

on10:
mov ax,16 ; bitis
out dx,ax
loop on10

off10:
mov ax,00
out dx,ax
loop off10

on11:
mov ax,48 ; bitis and 1st
out dx,ax
loop on11

off11:
mov ax,00
out dx,ax
loop off11

on12:
mov ax,112 ; bitis, 1st and 2nd
out dx,ax
loop on12

off12:
mov ax,00
out dx,ax
loop off12

on13:
mov ax,240 ; bitis, 1st, 2nd and 3rd
out dx,ax
loop on12

off13:
mov ax,00
out dx,ax
loop off13

on14:
mov ax,112 ; bitis, 1st and 2nd
out dx,ax
loop on14

off14:
mov ax,00
out dx,ax
loop off14

on15:
mov ax,48 ; bitis and 1st
out dx,ax
loop on15

off15:
mov ax,00
out dx,ax
loop off15

on16:
mov ax,16 ; bitis
out dx,ax
loop on16

off16:
mov ax,00
out dx,ax
loop off16

on17:
mov ax,240 ; bitis, 1st, 2nd and 3rd
out dx,ax
loop on17

off17:
mov ax,00
out dx,ax
loop off17

on18:
mov ax,240 ; bitis, 1st, 2nd and 3rd
out dx,ax
loop on18

off18:
mov ax,00
out dx,ax
loop off18

on13:
mov ax,240 ; bitis, 1st, 2nd and 3rd
out dx,ax
loop on12

off19:
mov ax,00
out dx,ax
loop off19


inc bl
cmp bl,20
jne start

mov ah,04ch
int 21h
end

Last edited by The_Big_K : 13th August 2008 at 06:41 PM. Reason: Added [code][/code] tags
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)
Old 14th August 2008, 12:18 AM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Re: Masm Parallel Port Need Help Badly...

guys please help me with this program.. if you need to ask me something that you don't understand or lack info's that you need please tell me.. help me with this code..
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 15th August 2008, 09:41 AM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Re: Masm Parallel Port Need Help Badly...

Guys please help me.. i don't know what's wrong... everything is set up correctly.. does masm parallel port works with xp.. help me.. i don't know what seems to be the problem..
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 15th August 2008, 01:22 PM
ash
Moderator
 
ash's Avatar
 
I'm a Crazy Communications Engineer
Join Date: 12th July 2007
Location: IIUM, Malaysia
Posts: 1,506
Default Re: Masm Parallel Port Need Help Badly...

Hey mhyshe, perhaps you can try to simulate it first?

8086 Microprocessor Emulator with Integrated 8086 Assembler
__________________
Keep it simple. Keep it real.
| New to CE? Click here! | Join our CE Bot project! | Problems? Questions? PM or mail me at ash{at]crazyengineers{dot]com |
ash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)
Old 16th August 2008, 01:16 AM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Re: Masm Parallel Port Need Help Badly...

Quote:
Originally Posted by ash View Post
Hey mhyshe, perhaps you can try to simulate it first?

8086 Microprocessor Emulator with Integrated 8086 Assembler
Hey man. thx for the reply.. uhm i already simulated this one.. this should be doing something like this
*
********
****************
**************************
*
*
***********
there.. this asterisk signifies leds. it just lights them up using parallel port like christmas lights do.. alternating lights, lights are on and off after the another. now the problem is they won't light up when they should.. im pretty sure that the program that i supplied is working (note: program was made 1year ago so i have forgotten what some of the lines do..that's where i need help)(though i need some more comments about it) but now it won't work... btw sir the assembler that i use i MASM and i just run the program on Command Prompt... Hope this helps you guys in solving my problem.. thank you very much

Last edited by mhyshe : 16th August 2008 at 01:21 AM.
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)
Old 18th August 2008, 02:43 PM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Re: Masm Parallel Port Need Help Badly...

sob no reply...
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)
Old 27th August 2008, 02:03 PM
CE - Newbie
 
I'm a Crazy IT Engineer
Join Date: 13th August 2008
Posts: 6
Default Re: Masm Parallel Port Need Help Badly...

up.. please help me
mhyshe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 10:48 PM.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.Ad Management by RedTyger