CrazyEngineers
  • 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...

    .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
    
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • mhyshe

    MemberAug 13, 2008

    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..
    Are you sure? This action cannot be undone.
    Cancel
  • mhyshe

    MemberAug 14, 2008

    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..
    Are you sure? This action cannot be undone.
    Cancel
  • Ashraf HZ

    MemberAug 14, 2008

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

    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • mhyshe

    MemberAug 15, 2008

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

    #-Link-Snipped-#
    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
    Are you sure? This action cannot be undone.
    Cancel
  • mhyshe

    MemberAug 17, 2008

    sob no reply...
    Are you sure? This action cannot be undone.
    Cancel
  • mhyshe

    MemberAug 26, 2008

    up.. please help me
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register