This document contains examples of SIC and SIC/XE assembly language instructions for performing various operations like arithmetic, data movement, string operations, and subroutines. It provides 17 multi-line examples of code sequences to perform tasks like setting variables to values, copying arrays, finding maximum array elements, and reading/writing records to devices.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
I am Frank Allen. I am a Computer Architecture Assignment Expert at architectureassignmenthelp.com. I hold a Master's in Computer Architecture from, Ontario Tech University, Canada. I have been helping students with their assignments for the past 10 years. I solve assignments related to Computer Architecture.
Visit architectureassignmenthelp.com or email info@architectureassignmenthelp.com. You can also call on +1 678 648 4277 for any assistance with Computer Architecture Assignments.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
CSC8503 Principles of Programming Languages Semester 1, 2015.docxfaithxdunce63732
CSC8503 Principles of Programming Languages Semester 1, 2015
Assignment 2
Due Date: 11:55pm AEST (13:55 UTC/GMT) Monday 10 May 2015
Weighting: 20%
Total marks: 20
Please submit this assignment using the assignment submission facility on the course
Study Desk. Submit a single file, either a ZIP or TAR archive. The archive
should contain (1) for Part A, a Haskell source file containing the function definitions,
and (2) for Part B, your version of all the files that are in the SPL distribution that you
downloaded.
Just add the Haskell file (call it say ass2.hs) to your collection of SPL files and zip or
tar them into an archive that you submit.
Part A – Haskell – 12 marks
Complete the following Haskell function definitions. Unless stated otherwise do not use library
functions that are not in the Haskell standard prelude. This constraint is so that you
gain practice in simple Haskell recursive programming. The Haskell 2010 standard prelude
definition is available at
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
Place all definitions in a single file. Submit just this text file electronically as
directed on the course Study Desk page. Use the specified function name as your
code will be tested by a Haskell function expecting that function name.
The testing program may use many more test cases than the ones shown in the specification.
So, please test your functions extensively to ensure that you maximise your marks.
1. [2 marks]
Write the function insertAt :: Int -> a -> [a] -> [a].
insertAt n x xs will insert the element x into the list xs at position n items from the
beginning of xs. In other words, skip n items in xs, then insert the new element.
You can assume that n will be a non-negative number. If n is greater than the length of
the list xs then add it to the end of the list.
For example
insertAt 3 ’-’ "abcde" ⇒ "abc-de"
insertAt 2 100 [1..5] ⇒ [1,2,100,3,4,5]
Hint: Use standard prelude functions ++ and splitAt.
2. [2 marks] Write a function uniq :: Eq a => [a] -> [a] that removes duplicate entries
from a sorted (in ascending order) list. The resulting list should be sorted, and no value
in it can appear elsewhere in the list.
For example:
1
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
uniq [1,2,2] ⇒ [1,2]
uniq [1,2,3] ⇒ [1,2,3]
3. [1 mark] Write a function
join :: Eq a => [(a,b)] -> [(a,c)] -> [(a,b,c)].
join takes two lists of pairs, and returns a single list of triples. A triple is generated only
when there exists a member of both argument lists that have the same first element. The
list elements are not sorted. This is the same semantics as the relational algebra natural
join operation.
For example:
join [(2,"S"),(1,"J")] [(2,True),(3,False)]
⇒ [(2,"S",True)]
join [(2,"S"),(1,"J")] [(2,1),(2,2),(3,4)]
⇒ [(2,"S",1),(2,"S",2)]
Hint: use list a comprehension.
4. [1 mark] This question extends the join function from question 3. Write the function
ljoin :: Eq a => [(a,b)] -> [(a,c.
I am Frank Allen. I am a Computer Architecture Assignment Expert at architectureassignmenthelp.com. I hold a Master's in Computer Architecture from, Ontario Tech University, Canada. I have been helping students with their assignments for the past 10 years. I solve assignments related to Computer Architecture.
Visit architectureassignmenthelp.com or email info@architectureassignmenthelp.com. You can also call on +1 678 648 4277 for any assistance with Computer Architecture Assignments.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
CSC8503 Principles of Programming Languages Semester 1, 2015.docxfaithxdunce63732
CSC8503 Principles of Programming Languages Semester 1, 2015
Assignment 2
Due Date: 11:55pm AEST (13:55 UTC/GMT) Monday 10 May 2015
Weighting: 20%
Total marks: 20
Please submit this assignment using the assignment submission facility on the course
Study Desk. Submit a single file, either a ZIP or TAR archive. The archive
should contain (1) for Part A, a Haskell source file containing the function definitions,
and (2) for Part B, your version of all the files that are in the SPL distribution that you
downloaded.
Just add the Haskell file (call it say ass2.hs) to your collection of SPL files and zip or
tar them into an archive that you submit.
Part A – Haskell – 12 marks
Complete the following Haskell function definitions. Unless stated otherwise do not use library
functions that are not in the Haskell standard prelude. This constraint is so that you
gain practice in simple Haskell recursive programming. The Haskell 2010 standard prelude
definition is available at
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
Place all definitions in a single file. Submit just this text file electronically as
directed on the course Study Desk page. Use the specified function name as your
code will be tested by a Haskell function expecting that function name.
The testing program may use many more test cases than the ones shown in the specification.
So, please test your functions extensively to ensure that you maximise your marks.
1. [2 marks]
Write the function insertAt :: Int -> a -> [a] -> [a].
insertAt n x xs will insert the element x into the list xs at position n items from the
beginning of xs. In other words, skip n items in xs, then insert the new element.
You can assume that n will be a non-negative number. If n is greater than the length of
the list xs then add it to the end of the list.
For example
insertAt 3 ’-’ "abcde" ⇒ "abc-de"
insertAt 2 100 [1..5] ⇒ [1,2,100,3,4,5]
Hint: Use standard prelude functions ++ and splitAt.
2. [2 marks] Write a function uniq :: Eq a => [a] -> [a] that removes duplicate entries
from a sorted (in ascending order) list. The resulting list should be sorted, and no value
in it can appear elsewhere in the list.
For example:
1
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
uniq [1,2,2] ⇒ [1,2]
uniq [1,2,3] ⇒ [1,2,3]
3. [1 mark] Write a function
join :: Eq a => [(a,b)] -> [(a,c)] -> [(a,b,c)].
join takes two lists of pairs, and returns a single list of triples. A triple is generated only
when there exists a member of both argument lists that have the same first element. The
list elements are not sorted. This is the same semantics as the relational algebra natural
join operation.
For example:
join [(2,"S"),(1,"J")] [(2,True),(3,False)]
⇒ [(2,"S",True)]
join [(2,"S"),(1,"J")] [(2,1),(2,2),(3,4)]
⇒ [(2,"S",1),(2,"S",2)]
Hint: use list a comprehension.
4. [1 mark] This question extends the join function from question 3. Write the function
ljoin :: Eq a => [(a,b)] -> [(a,c.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
1. System Software –Module 1 second
half
MODULE 1-CST 305 SYSTEM
SOFTWARE
TARGET ADDRESS CALCULATION
2. Textbook
System software: an
introduction to
systems
programming,
Leland L. Beck, 3rd
Edition, Addison
Wesley, Longman
Inc., 1997.
Fall 2014 CC 215 Data Structures 2
3.
4.
5. 5
1.3.3 SIC Programming Examples
• Sample data movement operations
– No memory-to-memory move instructions
9. 9
1.3.3 SIC Programming Examples
• String copy Initialise the loop before entering
Index in the string
Increment by one index register
X, compare with operand (11)
and update condition code (CC)
Jump to beginning of loop, if CC
is LT (Less Than)
16. • 1. Write a sequence of instructions for SIC to
compute ALPHA equal to the product of BETA
and GAMMA.
LDA BETA
MUL GAMMA
STA ALPHA
:
:
ALPHA RESW 1
BETA RESW 1
GAMMA RESW 1
17. • 2. Write a sequence of instructions for SIC/XE to
set ALPHA equal to 4 * BETA-9
• Use immediate addressing for the constants.
LDA BETA
LDS #4
MULR S,A
SUB #9
STA ALPHA
:
:
ALPHA RESW 1
BETA RESW 1
18. • 3. Write SIC instructions to swap the values of ALPHA
and BETA.
LDA ALPHA
STA GAMMA
LDA BETA
STA ALPHA
LDA GAMMA
STA BETA
:
ALPHA RESW 1
BETA RESW 1
GAMMA RESW 1
19. • 4. Write a sequence of instructions for SIC to set
ALPHA equal to the integer portion of BETA ÷
GAMMA.
LDA BETA
DIV GAMMA
STA ALPHA
:
ALPHA RESW 1
BETA RESW 1
GAMMA RESW 1
20. • 5. Write a sequence of instructions for SIC/XE to divide
BETA by GAMMA, setting ALPHA to the integer portion
of the quotient and DELTA to the remainder. Use
register-to-register instructions to make the calculation
as efficient as possible.
LDA BETA
LDS GAMMA
DIVR S, A
STA ALPHA
MULR S, A
LDS BETA
SUBR A, S
STS DELTA
:
ALPHA RESW 1
BETA RESW 1
GAMMA RESW 1
DELTA RESW 1
21. • 6. Write a sequence of instructions for SIC/XE to divide
BETA by GAMMA, setting ALPHA to the value of the
quotient, rounded to the nearest integer. Use register-to-
register instructions to make the calculation as efficient
as possible.
LDF BETA
DIVF GAMMA
FIX
STA ALPHA
:
ALPHA RESW 1
BETA RESW 1
GAMMA RESW 1
22. • 7. Write a sequence of instructions for SIC to clear a 20-
byte string to all blanks.
LDX ZERO
LOOP LDCH BLANK
STCH STR1,X
TIX TWENTY
JLT LOOP
:
STR1 RESW 20
BLANK BYTE C “ “
ZERO WORD 0
TWENTY WORD 20
23. • 8. Write a sequence of instructions for SIC/XE to
clear a 20-byte string to all blanks. Use
immediate addressing and register-to-register
instructions to make the process as efficient as
possible.
LDT #20
LDX #0
LOOP LDCH #0
STCH STR1,X
TIXR T
JLT LOOP
:
STR1 RESW 20
•
24. • 9. Suppose that ALPHA is an array of 100 words. Write
a sequence of instructions for SIC to set all 100
elements of the array to 0.
LDA ZERO
STA INDEX
LOOP LDX INDEX
LDA ZERO
STA ALPHA, X
LDA INDEX
ADD THREE
STA INDEX
COMP K300
TIX TWENTY
JLT LOOP
:
INDEX RESW 1
ALPHA RESW 100
ZERO WORD 0
K300 WORD 100
THREE WORD 3
25. • 10. Suppose that ALPHA is an array of 100 words.Write
a sequence of instructions for SIC/XE to set all 100
elements of the array to 0. Use immediate addressing
and register-to-register instructions to make the process
as efficient as possible.
LDS #3
LDT #300
LDX #0
LOOP LDA #0
STA ALPHA, X
ADDR S, X
COMPR X, T
JLT LOOP
:
ALPHA RESW 100
26. • 12. Suppose that ALPHA and BETA are the two arrays of 100
words. Another array of GAMMA elements are obtained by
multiplying the corresponding ALPHA element by 4 and adding the
corresponding BETA elements.
LDS #3
LDT #300
LDX #0
ADDLOOP LDA ALPHA, X
MUL #4
ADD BETA, X
STA GAMMA, X
ADDR S, X
COMPR X, T
JLT ADDLOOP
:
ALPHA RESW 100
BETA RESW 100
GAMMA RESW 100
27. • 13. Suppose that ALPHA is an array of 100 words. Write a
sequence of instructions for SIC/XE to find the maximum element in
the array and store results in MAX.
LDS #3
LDT #300
LDX #0
CLOOP LDA ALPHA, X
COMP MAX
JLT NOCH
STA MAX
NOCH ADDR S, X
COMPR X, T
JLT CLOOP
:
ALPHA RESW 100
MAX WORD -32768
28. • 14. Suppose that RECORD contains a 100-byte record. Write a
subroutine for SIC that will write this record on to device 05.
JSUB WRREC
:
WRREC LDX ZERO
WLOOP TD OUTPUT
JEQ WLOOP
LDCH RECORD, X
WD OUTPUT
TIX LENGTH
JLT WLOOP
RSUB
:
ZERO WORD 0
LENGTH WORD 1
OUTPUT BYTE X “05‟
RECORD RESB 100
29. /
• 15. Suppose that RECORD contains a 100-byte record,.
Write a subroutine for SIC/XE that will write this record
on to device 05.
JSUB WRREC
:
WRREC LDX #0
LDT #100
WLOOP TD OUTPUT
JEQ WLOOP
LDCH RECORD, X
WD OUTPUT
TIXR T
JLT WLOOP
RSUB
:
OUTPUT BYTE X ’05’
RECORD RESB 100
30. • 16. Write a subroutine for SIC that will read a record into a buffer. The record may be any length
from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The
subroutine should place the length of the record read into a variable named LENGTH.
JSUB RDREC
:
RDREC LDX ZERO
RLOOP TD INDEV
JEQ RLOOP
RD INDEV
COMP NULL
JEQ EXIT
STCH BUFFER, X
TIX K100
JLT RLOOP
EXIT STX LENGTH
RSUB
:
ZERO WORD 0
NULL WORD 0
K100 WORD 1INDEV
BYTE X ‘F1’
LENGTH RESW 1
BUFFER RESB 100
31. • 17. Write a subroutine for SIC/XE that will read a record into a buffer. The record may
be any length from 1 to 100 bytes. The end of record is marked with a “null” character
(ASCII code 00). The subroutine should place the length of the record read into a
variable named LENGTH. Use immediate addressing and register-to-register
instructions to make the process as efficient as possible.
JSUB RDREC
:
RDREC LDX #0
LDT #100
LDS #0
RLOOP TD INDEV
JEQ RLOOP
RD INDEV
COMPR A, S
JEQ EXIT
STCH BUFFER, X
TIXR T
JLT RLOOP
EXIR STX LENGTH
RSUB
:
INDEV BYTE X ‘F1’
LENGTH RESW 1
BUFFER RESB 100
•