• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

What is Flash Memory, How to access it ...

Hi all,
I have a question for u
I don't know What is inside a Flash memory, the way it work
And how to directly read data from Flash memory by C, ASM, or Interupt ... both in Windows and Linux
i think Some example code will make your explain clearer
1 Solution
Jaime OlivaresSoftware ArchitectCommented:
What kind of flash memory?
Compact Flash and PCMCIA flash memories act exactly as a harddisk. Normally are FAT formatted.
nghiaapAuthor Commented:
Flash memory in general, i think
because i know nothing about Flash memory
Jaime OlivaresSoftware ArchitectCommented:
It is an ambiguous question. There are many flash memory "packages", there is not a unique answer to make programs that access flash memories, that will depend on memory type.
If you want to learn more about flash memories in general, have a look at:
Increase Security & Decrease Risk with NSPM Tools

Analyst firm, Enterprise Management Associates (EMA) reveals significant benefits to enterprises when using Network Security Policy Management (NSPM) solutions, while organizations without, experienced issues including non standard security policies and failed cloud migrations

To know the internals  of a Flash memory, id suggest you to use the link suggested by jaime_olivares,
To read or write data to flash memory:
A flash memory is usually connected to the processor or controller via the bus,
bus contains three components - address, data and control,
the address and data bus are directly connected to the MPU or MCU where as the control bus is used to
differentiate the operations performed on the device namely read, write, enable, disable, etc.
If you are to read and write to flash memory, it has to be connected to your motherboard in some way
(USB, PCI, ISA, etc).
The operating system you use has some pre defined API on how to access each specific interface (USB, PCI, ISA, etc) which is called as the Device Driver.
So in the first step, you need to know on how to write that (which is again OS specific).
After you know that, you need to get the Document provided by the Manufacturer for the Flash memory
you are using (which is called as the Data sheet) to write the Control Routines for Reading and Writing
data from the chip.
After you finished this step, you need to integrate your control routines with the device driver.

sorry for making it look scary ;-)
Hope this  throws some light on what you are looking for.

nghiaapAuthor Commented:
thanks for all your information
There is also what is called 'Flash' memory in modems and T/As for storing settings. 'Flash' is also sometimes used as a name for CMOS memory. In these cases it is accessed in similar way to conventional memory except that it is in a fixed location in memory.


int * FlashMemory = (int *)0xC80000;

nghiaapAuthor Commented:
how can i get data from Flash disk
is there any function like _biosdisk, BIOS interrupt, DOS interrupt to get data from HD and  FD, or i can use these function too
nghiaapAuthor Commented:
hey, everybody
do you remember me?
please help me
Jaime OlivaresSoftware ArchitectCommented:
To get data from flash disk, just use standard harddisk functions, assumming it has FAT format.
Have a look to this previous question about reading disk sectors directly:
nghiaapAuthor Commented:
thanks jaime olivares
i'll give it a try

another thing.
can it use for difference OSs for example MS OSs and Linux or something else
Jaime OlivaresSoftware ArchitectCommented:
It will depend on how other OSs handles the memory. Some OS could not recognize the memory as a file, but surely Windows do it.
Jaime OlivaresSoftware ArchitectCommented:
Sorry, I mean:
 Some OS could not recognize the memory as a common disk
nghiaapAuthor Commented:
hi jaime olivares
there are 2 problems
1. the code in your link :http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_21011576.html
doesn't work,the error code is 1
2. which number is associated with flash disk (the number assigned to iregs.h.dl)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now