Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!



mr_biologymr_biology Member Posts: 44

hi again..

I've been trying to learn ports. I read a tutorial about VGA graphics thing and there was something about ports and ins and outs.
Now, what are these:
And how do they work?

Thanks for answering.


  • CroWCroW Member Posts: 348
    dont know exactly what 3c7h is,but the other are used for access to the palette of the VGA-chip in most a 256-color mode for example (like 13h) you have 256 possible colors.each color is a entry to the palette which holds the RGB components of the write the palette-index to 3c8h and could use 3c9h in 3reads or 3writes to get/change the contents of this register.


    ; color #0 is black by default
    mov dx,3c8h
    out dx,0
    mov dx,3c9h
    mov al,63 ; the 2 highest bits arent used
    out dx,al
    out dx,al
    out dx,al
    ; now color #0 is white
  • blipblip Member Posts: 756
    All three of those are used to access the palette data, whether it be a read or write. Port 3C7h is the read index, port 3C8h is the write index, and port 3C9h is the palette data register. After specifying an index on either of the index registers, read or write three bytes of data to/from the data port that corresponds to the red, green, and blue values of that palette index. You can easily specify more values without specifying a new index because the indices automatically increment after three reads or writes.
  • Andre YoungAndre Young USAMember Posts: 0

    ________ { } free ebooks and video tutorials about || Perl PHP C# Ruby Assembly Go Delphi JavaScript Python Visual Basic .NET Objective-C Scratch PL/SQL C Swift MATLAB Java R Visual Basic C++ Lisp D ABAP Scheme ML Logo Crystal Alice Awk COBOL Erlang Dart Hack Transact-SQL SAS Prolog VBScript Bash Julia Rust LabVIEW F# Apex FoxPro Kotlin Ada Clojure Scala Fortran Lua || ___

Sign In or Register to comment.