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 November 27th, 2004, 01:19 PM
    answer's Avatar
    answer answer is offline
    Member
     
    Join Date: Mar 2004
    Posts: 217
    answer is on a distinguished road (10+)
    programming an OS (Drawing to screen)

    How may I draw on the screen?

    This is what I got

    Code:
    [bits 16]
    [ORG 0x7C00]
    
    ; sets up video mode to mode 13
    mov ax, 0x0013
    int 0x10
    
    jmp main
    ; Just a loop to try and draw anything to screen
    main:
    	mov [eax], bl
    	inc bl
    	inc eax
    	cmp eax, 0x0000A000 + 0xC000
    	je .reset
    	.back1
    	cmp bl, 0xFF
    	je nebx
    	
    	jmp main
    
    .reset
    	mov eax, 0x0000A000
    	jmp .back1
    
    nebx:
    	mov bl, 9
    	jmp main
    
    times 510 - ($-$$) db 0
    
    dw 0xAA55
    Thanks in advance!
    __________________
    01101000011001010110110001101100011011110010000001110011011001010111100001111001
    Reply With Quote
      #2    
    Old November 27th, 2004, 03:57 PM
    Andreas Masur Andreas Masur is offline
    Moderator
    Power Poster
     
    Join Date: May 2000
    Location: KY, USA
    Posts: 18,610
    Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)Andreas Masur has a brilliant future (2000+)
    Re: programming an OS (Drawing to screen)

    [ Moved thread ]
    __________________
    Ciao, Andreas

    "Software is like sex, it's better when it's free." - Linus Torvalds


    Article(s): Allocators (STL) Function Objects (STL)
    Reply With Quote
      #3    
    Old November 28th, 2004, 06:20 AM
    lepricaun's Avatar
    lepricaun lepricaun is offline
    Member
     
    Join Date: Sep 2004
    Location: The Netherlands
    Posts: 30
    lepricaun is on a distinguished road (10+)
    Re: programming an OS (Drawing to screen)

    http://doorknobsoft.tripod.com/asm_tutorial.html

    read that tutorial, it has a few chapters about graphics to the screen. wish i could tell you more, but i'm still reading it at the moment
    __________________
    http://www.white-scorpion.nl
    Reply With Quote
      #4    
    Old November 29th, 2004, 08:12 PM
    answer's Avatar
    answer answer is offline
    Member
     
    Join Date: Mar 2004
    Posts: 217
    answer is on a distinguished road (10+)
    Re: programming an OS (Drawing to screen)

    What about 32bits addressing? As I read using 32bits there is no need for haveing a segment or an offset. Lets say we take a segment 0xA000 and offset of 0x0000. If I would address that in 32bits would it be '0xA000 0000'? Doing something similer doesn't work

    mov eax, 0xA0000000
    mov byte [eax], 0xFF

    but what's told on the site works. I don't understand why.
    __________________
    01101000011001010110110001101100011011110010000001110011011001010111100001111001
    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 11:29 AM.



    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