machine language

how to write in machine language in a floppy disk?
i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........

Comments

  • : how to write in machine language in a floppy disk?
    : i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........
    :

    There are plenty of resources here at Programmers Heaven for you to learn how to do this....just keep looking around and reading. Another portal for machine language information is:

    http://www.cybertrails.com/~fys/faq/index.htm


  • : : how to write in machine language in a floppy disk?
    : : i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........
    : :
    :
    : There are plenty of resources here at Programmers Heaven for you to learn how to do this....just keep looking around and reading. Another portal for machine language information is:
    :
    : http://www.cybertrails.com/~fys/faq/index.htm
    :
    :
    :
    Int13h and Int14h do count as machine language. They're interrupt calls. the 'INT' instruction hasn't been turned into a macro yet, unless I've been out of the Macro Assembler world for far too long.

    If you mean bypassing the BIOS, and using direct I/O, my response is 'eek!'. I hope you have some other computers to test it on. My machine of choice for bit-bashing is a P166.
  • : how to write in machine language in a floppy disk?
    : i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........
    :
    Are you trying to write an ISR?
  • : : how to write in machine language in a floppy disk?
    : : i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........
    : :
    : Are you trying to write an ISR?
    :
    ya, have u tried? could u plz help?
  • >> ya, have u tried? could u plz help?

    In that case I would suggest you read up on the PIC(Programmable Interrupt Controller). Do a search on google for info on it. Some basic things you do when writing your own ISR are:

    1. Save old vector
    2. Initialize ports 20h and 21h
    3. Disable other interrupts
    4. Initiate your ISR
    5. End of ISR restore old vector and enable interrupts

    Or something in that respect.
  • : how to write in machine language in a floppy disk?
    : i know writting and reading floppy disk using int13h & int 14h but not in m/c lang. so plz........
    :
    [green]
    Machine language can be easily made by assembling an .ASM file to a .COM
    since a .COM is nothing more than the assembled instructions.
    A .COM has no header or added stuff.
    So you can easily make the machine language you want to write to the
    floppy by just writing and assembling the code you want.
    It's correct every time that way. (As long as you wrote the .asm right.)
    Since you know how to write to the floppy using INT 13h
    you can just write the assembled code to the floppy:
    from a seperate file that has been assembled to a .COM
    or you can make a hex dump of the .COM and include it in your .ASM then write it.
    Or you can just write it in your .ASM file,
    then your program writes from the start of your instructions, to the end of your instructions and the machine language will be written to the disk as written.
    [/green]

    ZZTOP: JMP OVERCODE

    ;write your code here that gets written to the floppy

    CODElength EQU $-ZZTOP ; length of machine code to write
    OVERCODE:

    ;reset floppy drive code goes here, loop/try 5 times, AH=0 INT 13h

    PUSH CS
    POP ES
    MOV BX,ZZTOP ;offset, ES:BX = buffer adr to write
    MOV AX,CODElength
    ADD AX,511
    MOV AL,AH ;number of 512 sectors to write
    MOV AH,3 ;function
    MOV CH,cylinder
    MOV CL,sector ; 1-?
    MOV DH,head
    MOV DL,0 ;= A:
    INT 13h

    ;untested code
    if you want to add some code in a sector,
    you have to read the sector to memory,
    add the code you want,
    then write the code back to the sector.

Sign In or Register to comment.

Howdy, Stranger!

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

Categories