Pass 1:
Begin
get PROOADDR from operating system
set CSADDR to PROOADDR {for first control section}
while not end of input do
begin
read next input record {Header record for control section}
set CSLTH to control section length
search ESTAB for control section name
if found then
set error flag {duplicate external symbol}
else
enter control section name into ESTAB with value CSADDR
while record type ~ 'E' do
begin
read next input record
if record type = 'D' then
for each symbol in the record do
begin
search ESTAB for symbol name
if found then
set error flag (duplicate external symbol)
else
enter symbol into ESTAB with value(CSADDR + indicated address)
end {for}
end {while ~ 'E'}
add CSLTH to CSADDR {starting address for next control section}
end {while not EOF}
end {Pass 1}
The operation of absolute loader is very simple. The object code is loaded to specified locations in the memory. At the end the loader jumps to the specified address to begin execution of the loaded program. The role of absolute loader is as shown in the figure 4.4.
The advantage of absolute loader is simple and efficient. But the disadvantages are, the need for programmer to specify the actual address, and, difficult to use subroutine libraries.
The algorithm for this type of loader is given here. The object program and, the object program loaded into memory by the absolute loader are also shown. Each byte of assembled code is given using its hexadecimal representation in character form. Easy to read by human beings. Each byte of object code is stored as a single byte. Most machine store object programs in a binary form, and we must be sure that our file and device conventions do not cause some of the program bytes to be interpreted as control characters.
Begin
read Header record
verify program name and length
read first Text record
while record type is <> ‘E’ do
begin
{if object code is in character form, convert into internal representation} move object code to specified location in memory read next object program record
end
jump to address specified in End record
end
Program relocation
Ø The actual starting address of the program is not known until load time
Ø An object program that contains the information necessary to perform this kind of modification is called a relocatable program
Ø No modification is needed: operand is using program-counter relative or base relative addressing
Ø The only parts of the program that require modification at load time are those that specified direct (as opposed to relative) addresses
Ø Modification record
o Col. 2-7 Starting location of the address field to be modified, relative to the beginning of the program (Hex)
Col. 8-9 Length of the address field to be modified, in half-bytes (Hex)
Sometimes it is required to load and run several programs at the same time. The system must be able to load these programs wherever there is place in the memory. Therefore the exact starting is not known until the load time.
Absolute Program
In this the address is mentioned during assembling itself. This is called Absolute Assembly.
Consider the instruction:
55101B LDA THREE 00102D
· This statement says that the register A is loaded with the value stored at location 102D. Suppose it is decided to load and execute the program at location 2000 instead of location 1000.
· Then at address 102D the required value which needs to be loaded in the register A is no more available. The address also gets changed relative to the displacement
of the program. Hence we need to make some changes in the address portion of the instruction so that we can load and execute the program at location 2000.
· Apart from the instruction which will undergo a change in their operand address value as the program load address changes. There exist some parts in the program which will remain same regardless of where the program is being loaded.
· Since assembler will not know actual location where the program will get loaded, it cannot make the necessary changes in the addresses used in the program. However, the assembler identifies for the loader those parts of the program which need modification.
· An object program that has the information necessary to perform this kind of modification is called the relocatable program.
o45 001A ENDFIL LDA =C’EOF’ 032010
o215 1062 WLOOP TD =X’05’ E32011
Mnemonic Number Special Use
A 0 Accumulator; used for arithmetic operations
X 1 Index register; used for addressing
L 2 Linkage register; JSUB instruction stores the return address in this register
PC 8 Program counter; contains the address of the next instruction to be fetched for execution.
SW 9 Status word; contains a variety of information, including a Condition Code (CC)
Data Formats:
8 1 15
opcode x Address
Addressing Modes:
There are two addressing modes available, indicated by the setting of the x bit in the instruction.
Mode Indication Target Address Calculation
Direct x=0 TA= address
Indexed x=1 TA= address + (X)
Parentheses are used to indicate the contents of a register or a memory location. For example, (X) represents the contents of register X.
Example: LDA TEN LDA – 00
opcode x TEN
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Effective Address (EA) = 1000
Content of the address 1000 is loaded to Accumulator.
opcode x BUFFER
0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Effective Address (EA) = 1000 + [X]
= 1000 + content of the index register X
<html>
<head>
<title>Text Box</title>
</head>
<body>
<form action = " ">
<p> <label>Enter your Name:
<input type = "text" name = "myname" size = "20" maxlength = "20" />
</label> </p>
</form>
</body>
</html>
<html>
<head>
<title>Password Box</title>
</head>
<body>
<form action = " ">
<p> <label>Enter the email id:
<input type = "text" name = "myname" size = "24" maxlength = "25" /> </label> </p>
<p> <label>Enter the password:
<input type = "password" name = "mypass" size = "20" maxlength = "20" />
</label> </p>
</form>
</body>
</html>
<html>
<head>
<title>Radio Button</title>
</head>
<body>
<h3>Age Category ?</h3>
<form action = " ">
<p>
<label><input type="radio" name="age" value="under20" checked = “checked”/>0-19 </label>
<label><input type="radio" name="age" value="20-35"/>20-35</label>
<label><input type="radio" name="age" value="36-50"/>36-50 </label>
<label><input type="radio" name="age" value=" over50"/>over50</label>
</p>
</form>
</body>
</html>
<html>
<head>
<title>Check Box</title>
</head>
<body>
<h3>Grocery Checklist</h3>
<form action = " ">
<p>
<label><input type="checkbox" name="groceries" value="milk" checked=”checked”/>Milk</label>
<label><input type="checkbox" name=" groceries" value="bread"/> Bread </label>
<label><input type="checkbox" name=" groceries" value="eggs"/>Eggs</label>
</p>
</form>
</body>
</html>
<html>
<head>
<title> Menu </title>
</head>
<body>
<p> ATME Branches - Information Science, Computer Science, Electronics, Electrical, Mechanical </p>
<form action = "">
<p> With size = 1 (the default)
<select name = "branches">
<option> Information Science </option>
<option> Computer Science </option>
<option> Electronics </option>
<option> Electrical </option>
<option> Mechanical </option>
</select>
</p>
</form>
</body>
</html>
<html>
<head>
<title> text area </title>
</head>
<body>
<form action=" ">
<h3> Enter your comments</h3>
<p>
<textarea name="feedback" rows="5" cols="100">
(Be Brief and concise)
</textarea>
</p>
</form>
</body>
</html>
<html>
<head>
<title> action buttons </title>
</head>
<body>
<form action=" ">
<p>
<input type="SUBMIT" value="SUBMIT"/>
<input type="RESET" value="RESET"/>
</p>
</form>
</body>
</html>
<html>
<head>
<title> CompleteForm</title>
</head> <body>
<h1>Registration Form</h1>
<form action=" ">
<p> <label>Enter your email id:
<input type = "text" name = "myname" size = "24" maxlength = "25" />
</label> </p>
<p> <label>Enter the password:
<input type = "password" name = "mypass" size = "20" maxlength = "20" />
</label> </p>
<p>Sex</p>
<p>
<label><input type="radio" name="act" value="one"/>Male</label>
<label><input type="radio" name="act" value="two"/>Female</label>
</p>
<p>Which of the following Accounts do you have?</p>
<p>
<label><input type="checkbox" name="act" value="one"/>Gmail</label>
<label><input type="checkbox" name="act" value="two"/>Facebook</label>
<label><input type="checkbox" name="act" value="three"/>Twitter</label>
<label><input type="checkbox" name="act" value="four"/>Google+</label>
</p>
<p> Any Suggestions?</p>
<p> <textarea name="feedback" rows="5" cols="100"> </textarea> </p>
<p>Click on Submit if you want to register</p>
<p> <input type="SUBMIT" value="SUBMIT"/>
<input type="RESET" value="RESET"/>
</p>
</form>
</body>
</html>
<html>
<head>
<title> Table with text and image </title>
</head>
<body>
<table border = "border">
<caption>VTU Memo </caption>
<tr>
<th> VTU </th>
<th> Image </th>
</tr>
<tr>
<td> Funny image </td>
<td> <img src = "img(13).jpg" alt = "cant display"/></td>
</tr>
<tr>
<td> True Story </td>
<td> <img src = "img(19).jpg" alt = "cant display"/></td>
</tr>
</table>
</body>
</html>
The rowspan and colspan Attributes:
Multiple-level labels can be specified with the rowspan and colspan attributes.
<html>
<head>
<title>row-span and column-span</title>
</head>
<body>
<p> Illustration of Row span</p>
<table border="border">
<tr>
<th rowspan="2"> ATME</th>
<th>ISE</th>
</tr>
<tr>
<th>CSE</th>
</tr>
</table>
<p> Illustration of Column span</p>
<table border="border">
<tr>
<th colspan="2"> ATME </th>
</tr>
<tr>
<th>ISE</th>
<th>CSE</th>
</tr>
</table>
</body>
</html>
The align and valign Attributes:
<html>
<head>
<title> Align and valign </title>
</head>
<body>
<p>Table having entries with different alignments</p>
<table border="border">
<tr align = "center">
<th> </th>
<th> Column Label </th>
<th> Another One </th>
<th> Still Another </th>
</tr>
<tr>
<th> Align </th>
<td align = "left"> Left</td>
<td align = "center"> Center </td>
<td align = "right"> right </td>
</tr>
<tr>
<th> <br/>Valign<br/><br/><br/></th>
<td> Deafult </td>
<td valign = "top"> Top</td>
<td valign = "bottom"> Bottom</td>
</tr>
</table>
</body>
</html>
<html>
<head>
<title> cell spacing and cell padding </title>
</head>
<body>
<h3>Table with space = 10, pad = 50</h3>
<table border = "7" cellspacing = "10" cellpadding = "50">
<tr>
<td> Kswamy</td>
<td>Chethan </td>
</tr>
</table>
<h3>Table with space = 50, pad = 10</h3>
<table border = "7" cellspacing = "50" cellpadding = "10">
<tr>
<td> Divya </td>
<td>Chethan </td>
</tr>
</table>
</body>
</html>
<html> <head> <title> Unordered List </title> </head> <body> <h1> Some Common Single-Engine Aircraft </h1> <ul> <li> Cessna skyhawk</li> <li> Beechcraft Bonaza</li> <li> piper Cherokee</li> </ul> </body> </html>
Jump to Page : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53