Assembly Language - Computer Science Alevel (AQA)

Watch
lissishannyn
Badges: 9
Rep:
?
#1
Report Thread starter 1 month ago
#1
Hi! I'm a bit stuck on this question:

A process can only begin if bits 0, 3, 5 and 6 of an 8 bit accumulator are set to 1. The status of the other bits has no effect on the process. Write the key assembly language instructions to check whether the process can take place.

Thank you!!
0
reply
Strange5050
Badges: 17
Rep:
?
#2
Report 1 month ago
#2
Do not email him - there is no need. If he's able to help you he will post it in this thread or send you a direct message. High likely to be malicious.
2
reply
techsnowy
Badges: 7
Rep:
?
#3
Report 1 month ago
#3
@Strange don't be so naive am a good person okay I'll send the program direct to him or just the other way round, any thanks.
0
reply
Strange5050
Badges: 17
Rep:
?
#4
Report 1 month ago
#4
(Original post by techsnowy)
@Strange don't be so naive am a good person okay I'll send the program direct to him or just the other way round, any thanks.
This is complete nonsense. Look at all your recent posts? They're all trying to encourage people to give you their email for you to send stuff.

"can help I'll send you the answer later in word doc your mail please."
"yes I do know kindly mail at [email], thanks."
"am willing to participate with you till the end of the semester, thanks you will get my mail from [email]"
"yes am proficient with vectors, i can assist you in that field thanks kindly mail me at [email]."

Why is asking people to send emails to you even necessary when there are temporary file-hosting sites which allow a safe transfer of files, and online paste bins for code snippets?

More so you seem to have the 'answers' for a wide range of subjects: Maths, Computer Science, and Psychology to name a few. In an account that seems to be relatively new as well. Very suspicious.
Last edited by Strange5050; 1 month ago
1
reply
techsnowy
Badges: 7
Rep:
?
#5
Report 1 month ago
#5
section***** .text

** global _start**** ;must be declared for linker (ld)

_start:************ ;tell linker entry point

******

** ;writing the name 'Tech snowy'

** mov edx,8****** ;message length

** mov ecx, name** ;message to write

** mov ebx,1****** ;file descriptor (stdout)

** mov eax,4****** ;system call number (sys_write)

** int 0x80******* ;call kernel

******

** mov [name],* dword 'Tech'*** ; Changed the name to Tech S owy

******

** ;writing the name 'Tech Snowy'

** mov edx,8****** ;message length

** mov ecx,name*** ;message to write

** mov ebx,1****** ;file descriptor (stdout)

** mov eax,4****** ;system call number (sys_write)

** int 0x80******* ;call kernel

******

** mov eax,1****** ;system call number (sys_exit)

** int 0x80******* ;call kernel

*

section***** .data

name db 'techsnowy '

*
0
reply
mqb2766
Badges: 19
Rep:
?
#6
Report 1 month ago
#6
(Original post by techsnowy)
section***** .text

** global _start**** ;must be declared for linker (ld)

_start:************ ;tell linker entry point

******

** ;writing the name 'Tech snowy'

** mov edx,8****** ;message length

** mov ecx, name** ;message to write

** mov ebx,1****** ;file descriptor (stdout)

** mov eax,4****** ;system call number (sys_write)

** int 0x80******* ;call kernel

******

** mov [name],* dword 'Tech'*** ; Changed the name to Tech S owy

******

** ;writing the name 'Tech Snowy'

** mov edx,8****** ;message length

** mov ecx,name*** ;message to write

** mov ebx,1****** ;file descriptor (stdout)

** mov eax,4****** ;system call number (sys_write)

** int 0x80******* ;call kernel

******

** mov eax,1****** ;system call number (sys_exit)

** int 0x80******* ;call kernel

*

section***** .data

name db 'techsnowy '

*
I hope the OP doesn't submit that, they'll probably be pulled in for plagiarism
http://asm.sourceforge.net/intro/hello.html
I'd echo Strange5050 concerns.
Last edited by mqb2766; 1 month ago
0
reply
techsnowy
Badges: 7
Rep:
?
#7
Report 1 month ago
#7
nope they will not pull it for plagiarism thanks.
0
reply
lissishannyn
Badges: 9
Rep:
?
#8
Report Thread starter 1 month ago
#8
(Original post by lissishannyn)
Hi! I'm a bit stuck on this question:

A process can only begin if bits 0, 3, 5 and 6 of an 8 bit accumulator are set to 1. The status of the other bits has no effect on the process. Write the key assembly language instructions to check whether the process can take place.

Thank you!!
lol what is going on
1
reply
Joinedup
Badges: 20
Rep:
?
#9
Report 1 month ago
#9
The bit pattern corresponding to the bits you do care about looks like 00110101

in order to mask out the bits you don't care about you can AND the accumulator with that bit pattern

then you can compare (CMP) the accumulator to the bit pattern

the zero flag is now set if bits 0,3,5 and 6 in the accumulator were all binary 1 - otherwise the zero flag is not set

Jump if zero flag is set (JE) to the code you need to run
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Are you tempted to change your firm university choice on A-level results day?

Yes, I'll try and go to a uni higher up the league tables (42)
27.1%
Yes, there is a uni that I prefer and I'll fit in better (14)
9.03%
No I am happy with my choice (88)
56.77%
I'm using Clearing when I have my exam results (11)
7.1%

Watched Threads

View All