CS 2650 - Computer Architecture

Assembler Program #2
Due 6April, 2009 prior to class


Display your name, the System Date, and the System Time, centered in the display.


John Locke
04/03/2009
16:23:42



Be careful to follow the steps exactly so as not to completely erase the hard disk or<worse>!

1.  Open Notepad or another text editor
2.  Key in the basic NASM template as in assignment #1.
3.  Write Assembler code to:


4.  Save your program as CS2650P2.ASM to the same folder as NASMW.EXE and EXEBIN.MAC

5.  Compile your program by typing at the command line: 
NASMW CS2650P2.ASM -oCS2650P2.COM

6.  If you have errors on compile, correct them and then recompile as in #5

7.  Thoroughly test your program before submitting it.
8.  Upload your program (both .asm and .com files) using the Web Uploader by the due date 
  


 

Interrupt 1A, Service 4
Read Real-Time Clock Date
Interrupt 1A, Service 2
Read Real-Time Clock Time
Registers on Entry:
    AH:    4
Registers on Entry:
    AH:   2
Registers on Return:
    CH:    Century (BCD)
    CL:    Year (BCD)
    DH:    Month (BCD)
    DL:    Day (BCD)
   Registers on Return:
    CH:    Hours (BCD)
    CL:    Minutes (BCD)
    DH:    Seconds (BCD)

 



 Int 10h  Function 6  Scroll window area

Input Registers
 AH  06h
 AL  Number of lines to scroll (if zero, entire windows is blanked)
 BH  Attribute used for blanked area (Attribute byte defined below)
 CH  Row, upper left corner
 CL  Column, upper left corner
 DH  Row, lower right corner
 DL  Column, Lower right corner

Output Registers
 None



Int 10h  Function 13h Write ASCII string

Input Registers
 AH  13h
 AL  Write mode   Use 00h
 BH  Video Page  Use 00h
 BL  Attribute byte  (Attribute byte defined below)
 CX  Length of String
 DH  Row at which to write string
 DL  Column at which to write string
 ES:BP Pointer to string

Output Registers
 None


Attribute Byte breakdown

Bit 0 - Blue component of foreground color
Bit 1 - Green component of foreground color
Bit 2 - Red component of foreground color
Bit 3 - Intensity component of foreground color
Bit 4 - Blue component of background color
Bit 5 - Green component of background color
Bit 6 - Red component of background color
Bit 7 - Intensity component of background color