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


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • 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 September 27th, 2004, 01:46 AM
    skane2004 skane2004 is offline
    Junior Member
     
    Join Date: Sep 2004
    Posts: 1
    skane2004 is an unknown quantity at this point (<10)
    Assembly Help =(

    I'm new with programming in assembly...and when I don't know what I'm doing wrong, it makes it very difficult to fix my mistakes =P I'm using nasm assembler and this simple code:

    ;ASM Example 2.1 -- password protect

    org 100h

    section .text
    gprmpt: mov dx,prompt ;get ready to prompt user
    mov ah,09h ;by sending a character string
    int 21h ;Okay -- now do it
    ginput: mov ah,08h
    int 21h
    mov dl,al
    mov ah,09h
    int 21h

    mov ah, 4ch
    int 21h

    section .data
    prompt db "Please enter password: ","$"
    invalid db "ERROR: Invalid login$"
    verify db "Password accepted.$"

    There are no errors, and right now all I'm trying to do is display the character they input...some characters work, but others display the rest of the code or do something else. I think my problem is something with how I've declared my prompt, invalid, and verify db's...please help =)
    Reply With Quote
      #2    
    Old October 15th, 2004, 06:26 AM
    jc_23 jc_23 is offline
    Junior Member
     
    Join Date: Oct 2004
    Posts: 12
    jc_23 is an unknown quantity at this point (<10)
    Re: Assembly Help =(

    int21h ah=09 is for display string, not for character
    if you want display character, should use int21h, ah=2
    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 10:39 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009