Low-Level Programming Homework Help

Programming in most languages is done at a high level, with the programming libraries providing access to the screen, files, and keyboard without dealing with the actual implementation details. When you program in Assembly language, you have to deal with the actual hardware implementation; this means if you are accessing the screen, you need to deal with the different resolutions and bit depths, and for key handling, you may need to even need to handle the shift key yourself. One advantage of dealing at a low level is that you can make optimizations, for example, if you are writing code to draw text on a 320x200 VGA mode display, you can perform calculations to get the address for the initial character and then use fixed offsets and write to the screen in much less time. When writing code that runs at a low level, you have less facilities for debugging, but you do have more control and can do things that the operating system was not designed to do. Say you are writing a routine to render text, you can easily modify the code to write the text with a black outline to improve the legibility. The operating system (or the libraries provided by higher-level languages) is designed for general usage and does not offer the ability to customize the result.

Assembly Programming – A Low-Level Language

The MARS Mips assembly language simulator provides access to a virtual screen where you can experiment with different layouts of video memory and access the keyboard, and Emu8086 provides an emulation of an old IBM PC where you can access the screen at a low level in character mode or one of the multiple different video modes.

Assembly language is required if you want to write an interrupt handler, which is how some hardware devices interface with the computer. If you want to write a key handler that checks for a certain keypress to enable some debugging facility, then by using an interrupt handler that checks for keystrokes, you can check if it is the keystroke that you are using and set a flag to modify the behavior.

C Programming Higher than Assembly Language, Still Considered A Low-Level Language

Many low-level programming assignments are designed to run in Linux under C. Although this is a higher level than assembly language, it is still considered a low-level language as you have to deal with memory management yourself. Some C programming homework involves writing a replacement for the malloc and free routines, and others involve writing code that provides a device driver to deal with a virtual file system, or dealing with multiple processes and sharing memory between them. C can also be used to write to a memory-mapped screen, although it depends on the protection level as to whether you can do this in user mode.