Completely Solved C, C++ Programs Assignment.




The SBS-1 System-The Software

Filed Under:

The Software: 
 The SBS-1 monitor program provides utility functions employing the kit’s onboard keyboard as console. The program resides in 2K bytes of the ROM memory, between location 000H and 07FFH. The 8085 makes use of a 16bit internal register called the stack pointer to point to an area of memory called the stack. The 8085’s stack is used for saving many things, such as memory addresses for returns from subroutines. It is important always to define the stack pointer at the beginning of one’s program to avoid storing data in the wrong place. Locations 20C0H through 20D0H in RAM are reserved by the monitor for jump instructions when all interrupts are used. Thus, one should set the stack pointer initially at 20C2H by the use of the program instruction LXI SP, 20C2H, in order to keep his own stack clear of data and programs he wants to protect. If less than the full complement of interrupts is utilized some or all of the unused space above 20C2H can be allocated to stack as described above. The stack must still occupy an unbroken string of contiguous memory locations. There is provision for on board 4K bytes of static RAM from 2000H to 37FFH. The user can use this RAM space except the locations from 20C0H to 20FFH which is kept for monitor use. One may borrow several of the SBS-1 monitor routines to simplify his programming task. Following discussion provides descriptions and calling addresses for some of the available routines. 

 Monitor Subroutines that can be used by the user: Update Address (Calling address 0363H) This routine updates address field of the display. The contents of the D-E register pair are displayed in the address field of the display. The contents of all the CPU registers and flags are affected. 

 Update Data (Calling Address 036EH) This routine updates data field of the display. The contents of the A register are displayed in Hex notation in the data field of the display. The contents of all the CPU registers and flags are affected. 

 Time Delay (Calling address 05F1H) This routine takes the 16-bit content of D-E register pair and counts down to zero, then returns to the calling program. The contents of A, D and E registers and flags are affected. 

 Output Characters to Display (Calling Address 02B7H) 
This routine sends characters to the display with the parameters set up by registers A, B, H and L.

Register A                   0  use address field
                                     1  use data field
Register B                   0  decimal point off
                                     1  decimal point at right edge of field
Register H & L       starting address of character to be sent.

The following table shows the characters that can be displayed and their corresponding hexadecimal codes.

Character Displayed
Hexadecimal memory content pointed to by H-L register pair
0
00
1
01
2
02
3
03
4
04
5
05
6
06
7
07
8
08
9
09
A
0A
B
0B
C
0C
D
0D
E
0E
F
0F
H
10
L
11
P
12
I
13
R
14
S
05
Blank
15



Back to main directory:  Microprocessor    Hardware Practical


Get Free Programming Tutorials and Solved assignments