Thread: C Boot code? ha?

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    3

    C Boot code? ha?

    Hello,
    When I write a new boot script I always do it in asm but have anyone ever done it with C? I cant imagin it. My profiser told me that he has done it. HOW, Only in C? With out any other langauge. If some one knows please help me. If i dont find out I think I will go mad and he will NEVER tell me!!!!! HAAAAAAAAA
    Hammm I could prove him rung :-| or can I?

    Alexander

  2. #2
    Registered User lliero's Avatar
    Join Date
    Oct 2001
    Posts
    59

    Talking asm

    ammm
    in c you can call asm...
    i cannot go into detail about this,


    you can take a look at this code fragment



    void setcur(int _setcursor_){
    union REGS reg;
    reg.h.ah = 1;


    if( _setcursor_ > 2 ){ _setcursor_=_setcursor_ % 2 ;}
    if( _setcursor_ == 0 ) { reg.h.ch = 32;}
    if( _setcursor_ == 1 ) { reg.h.ch = 1;}
    if( _setcursor_ == 2) { reg.h.ch = 8;}
    reg.h.cl = 9;
    int86(0x10,&reg,&reg);
    }


    this function i made, will set the cursor to normal, Block or set the cursor off

    as you can see this is some assembly. if i am not mistaken....


    well to every one you can copy the code freely


    thx...
    " programming is 1% syntax and 99% logic "

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 07:23 AM
  2. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM