Thread: Assembly Help

  1. #1
    Tleggo
    Guest

    Assembly Help

    I had to answer some questions for homework but i can't seem to find the answer to all of them and no one knows the answer to these questions i wanted to know if maybe anyone could help me out??
    OH yeah BTW it's Assembly language.....being that there arent any AL boards out there i figured that maybe some experience C programmers could help me out thanks allot i really appreciate it!


    Assuming that bits 0-4 holds a store a department number and bits 5-7 holds a store number with in the following bit mapped field. What are the values shown here.
    11000101 store= , department =
    00101001 store= , department =
    01010101 store= , department =

    Questions #2
    Assume that you are decoding the file allocation table of 1.44 MB diskette AX contains the previous cluster number and DX contains the current offset into the FAT. Write a series of assembly language statements that will calculate new cluster number and place it in AX?

    Question # 3
    a)Assuming that a buffer is 512 bytes memory buffer, what is wrong in the following subroutine that reads a single sector from drive A ?
    read_sector proc
    mov al, 0
    mov cl, 1
    mov dx,12
    mov bx,offset buffer
    int 25h
    ret
    read_sector endp
    b)What is the offset of the 20h record in the file that contains 50 bytes fixed length records?

    Question #4
    a)If a one side disk has 40 tracks per side and each track contains eight 512 bytes sectors what is the total disk capacity?
    b)What date is indicated by the following date stamp?
    0000101011011010

    Question #5
    Suppose that FH contains the file handle of file open for write and that Date is the address of a byte string of the form MM/DD/YY containing today’s date. Write assembly codes to write date into the current file at the file's current position?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Why don't you try www.flashdaddee.com They have a Assembler message board, and a lot of the people that visit here visit there too.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Not to mention that those answers are very straightforward. Try it yourself, then go to flashdaddee and we will help. But if we do it all for you, you will not learn aynthing. And in assembly especially, it is very important that you learn it and not just skim over the information.

    For the first question, you just need to know how base 2 works.



    Question 1 - Binary
    <-...... 1 0 1 1 0 1 .....->
    <-......+(2^8)+(2^7)+(2^6)+(2^5)+(2^4)+(2^3)+.....->

    If you can figure this diagram at, then you should be able to figure out those binary numbers.


    Question 2 - FAT
    For the next one, you need to increment the fat offset, reterieve the cluster number from that pointer. This seems a bit simpllified sincde to actually load a cluster in memory you need to know how many sectors per cluster there are. Also for FAT 12 you must check to see if the next cluster is 0FFFh. If it is. then it marks the end of the cluster chain. But I'm sure your teacher does not want all of that. They just want you to be able to figure out how to do the first part in assembly.

    Question 3
    Look at a DOS tech ref or the RBIL to see what you need to pass in the registers for the call to succeed. I'm sure you will find your answer there. I don't read disks via int 25h (that might be the problem in the code - most DOS calls reside on 21h) and I'm not sure that is the correct interrupt at all. They probably mean int 21h - DOS Read Sector, but again I don't use this since when writing an OS you cannot call DOS. I use int 13h from the BIOS to read sectors.

    Anyways, there is some help just so you know I'm not brushing you off. The rest of the questions are pretty simple as well. Look at your notes, look at the art of assembly language book, look at your textbook, and try on your own to get it. If you cannot, post your answers on the assembly lang forum at www.flashdaddee.com and we will certainly be glad to help you.

  5. #5
    Tleggo
    Guest
    Wow, you're a really nice guy, god bless you

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Assembly
    By mrafcho001 in forum Tech Board
    Replies: 5
    Last Post: 03-12-2006, 05:00 PM
  2. C to assembly interface
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-04-2005, 03:51 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 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. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 03:35 AM