IGNORED

# Need answers from people who know assembly language.

## Recommended Posts

I'm about half way through correcting HTML errors on my web site and I noticed that Lesson 6 and Lesson 7 by Robert M still don't have answers for the exercises.

Can somebody who knows assembly language post the answers to the exercises?

Lesson 6

Lesson 7

Thanks.

##### Share on other sites

Posted (edited)

Lesson 6

Quote

1.Given the following bytes (A) and bitmask (B) values calculate the result C, for C = A & B, C = A | B, and C = A ^ B.

1. A = %11111111, B=%10101010
2. A = %00000000, B=%01010101
3. A = %11110000, B=%01110111
1. %10101010, %11111111, %01010101
2. %00000000, %01010101, %01010101
3. %01110000, %11110111, %10000111
Quote

2.Given the following bytes (A) and bitmask (B) values calculate the result C, for C = A NAND B, C = A NOR B, and C = A XNOR B.

1. A = %10110110, B=%00000000
2. A = %11111111, B=%11111111
1. %11111111, %01001001, %01001001
2. %00000000, %00000000, %11111111
Quote

3.Fill in the blanks '_____' in this pseudocode example with what you believe is the correct logical function.

SUBROUTINE CheckPlayerStatus

BEGIN

IF (PLAYER.has_green_key = TRUE) ___ (Player.is_touching_door) THEN

Goto PlayerExitsLevel

ELSE IF (Player.touching_monster = TRUE) ___ (Player.touching_arrow) THEN

Goto PlayerKilled

ELSE IF (Player.touching_gold = TRUE) ___ (Monster.died) THEN

Goto PlayerGetsPoints

ENDIF

END CheckPlayerStatus

AND, OR, OR

(I would remove green from the key)

Edited by Thomas Jentzsch
##### Share on other sites

3 hours ago, Thomas Jentzsch said:

Lesson 6

1. %10101010, %11111111, %01010101
2. %00000000, %01010101, %01010101
3. %01110000, %11110111, %10000111
1. %11111111, %01001001, %01001001
2. %00000000, %00000000, %11111111

AND, OR, OR

(I would remove green from the key)

Thanks. It's now on the page for Lesson 6:

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.