CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Deploying Windows Server 2008 with System Center
  • Remote Desktop Protocol Performance Improvements in Windows Server 2008 R2 and Windows 7
  • The Microsoft Dynamics CRM Security Model
  • SQL Server Modeling Services with Microsoft Visual Studio 2010 Beta 2

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old May 31st, 2009, 06:41 PM
    Mark_76 Mark_76 is offline
    Junior Member
     
    Join Date: May 2009
    Posts: 1
    Mark_76 is an unknown quantity at this point (<10)
    Assembler language program help

    maxbotix.com EZ0 sensor

    Above is a simple distance sensor I bought.
    I want to turn on LED's for a distance to a wall "proximity warning device".

    RED = stop!
    Amber = Warning prepare to stop
    Green = ok to drive

    I will simulate using a Dragon 12+ plus microcontroller board and debug 12.

    I need code for this in Assembler language.

    Note:
    Once I have it I want to consider sounds such that:
    RED led = constant warning chime
    Yellow = slow beep
    Green = no beep
    Flashing red LED = you are closer than 1.0 feet to a wall and are about to hit.

    I will use the AN analog o/p of the maxbotix sensor.
    The device turns out a voltage corresponding to the distance.

    So, when you are at 5 feet or greater from a wall we should turn on a green LED.

    If we are at 2.5 to 4.9 feet we should turn on a Yellow led.

    If we are at 2.4 feet to 1.5 feet = red.

    I have the idea that anything under 1.4 to 0 feet should flash a red led!!!

    This is a simulation I am doing.


    Does anyone know how to go about illuminating external LED's that are breadboarded onto the Dragon 12+ microcontroller?
    It is NOT codewarrior so I have been having difficulty finding any example scripts.
    It is in Debug 12, 68hcs12, Assembler language prgramming.
    Reply With Quote
      #2    
    Old October 16th, 2009, 08:08 AM
    svn_11@yahoo.com svn_11@yahoo.com is offline
    Junior Member
     
    Join Date: Oct 2009
    Posts: 4
    svn_11@yahoo.com is an unknown quantity at this point (<10)
    Re: Help using assembly language creating a calculator

    pls help me..i im nobe in assembly language i dont know the nxt step.
    this is the code but i dont know the nxt
    a100
    mov ax, 00
    int 33
    mov ax, 01
    int 33
    mov ax, 03
    int 10
    mov ah, 02
    mov dx, 001c
    mov bh, 00
    int 10
    mov ah, 09
    mov dx, 01d3
    int 21
    mov ah, 02
    mov dx, 031c
    int 10
    mov ah, 09
    mov dx, 0228
    int 21
    mov ah, 02
    mov dx, 041d
    int 10
    mov ah, 09
    mov dx, 01de
    int 21
    mov ah, 02
    mov dx, 051c
    int 10
    mov ah, 09
    mov dx, 01e7
    int 21
    mov ah, 02
    mov dx, 061a
    int 10
    mov ah, 09
    mov dx, 01f3
    int 21
    mov ah, 02
    mov dx, 071d
    int 10
    mov ah, 09
    mov dx, 0202
    int 21
    mov ah, 02
    mov dx, 0a1e
    int 10
    mov ah, 09
    mov dx, 0232
    int 21
    mov cx, 0000
    mov dx, 0000
    mov bx, 0000
    mov ax, 03
    int 33
    cmp bx, 1
    jne 017c
    cmp cx, 0120
    jg 17c
    cmp cx, 00d0
    jl 17c
    cmp dx, 0020
    je 01ad
    cmp dx, 0028
    je 01b2
    cmp dx, 0030
    je 01b7
    cmp dx, 0038
    je 01bc
    cmp dx, 0050
    je 01d1
    jne 17c
    mov dx, 020b
    jmp 01bf
    mov dx, 020f
    jmp 01bf
    mov dx, 0218
    jmp 01bf
    mov dx, 0221
    mov ah, 02
    mov bx, 0000
    mov di, dx
    mov dx, 0c1d
    int 10
    mov dx, di
    mov ah, 09
    int 21
    int 20
    db "Calculator$"
    db "Addition$"
    db "Subtraction$"
    db "Multiplication$"
    db "Division$"
    db "Add$"
    db "Subtract$"
    db "Multiply$"
    db "Divide$"
    db "Menu$"
    db "Exit$"

    this is the frame

    menu
    add
    sub
    mul
    divide
    exit
    1st screen
    The 1st frame nid to be clicakble to do the 2 screen frame
    example if u click the a,d,d,i.t,i,o,n any of the letters we going to second frame to do the operation the same in subtraction and multiplication but the division nid a two answer the quotient and remainder

    1st number___
    2nd number___
    result___
    press any key 2 return to menu
    second screen
    note 3 digits max including negative value and the numbers be in ascii code...

    pls help me..tnx
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

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

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 03:03 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.