Jump to content
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

https://www.randomterrain.com/atari-2600-memories-tutorial-robert-m-06.html

https://forums.atariage.com/topic/39747-assembly-language-programming-lesson-6-binary-logic/

 

Lesson 7

https://www.randomterrain.com/atari-2600-memories-tutorial-robert-m-07.html

https://forums.atariage.com/topic/181981-assembly-language-programming-lesson-7-state-machines/

 

 

Thanks.

Link to comment
Share on other sites

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
  • Thanks 1
Link to comment
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:

 

https://www.randomterrain.com/atari-2600-memories-tutorial-robert-m-06.html#answers

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...