Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Jessica Hawkwell / kcpu

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 2
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #1 opened Sep 30, 2017 by Jessica Hawkwell@LadySerenaKitty
  • New issue
New issue

Weird MOVS bug

Memory addresses below 0x0020 seem to be vulnerable to some sort of odd bug in the MOVB/MOVS logic. It is demonstrated with the following:

movs $0 r2
movs 10,16 1

add r0 16
add r2 1
movs $0 r2
jdl r0 512 2a,16

In the output file system.mem (or system.mem.bin), one can see the address 0x0010 is not being stored. The MOVS does initially place the value, but then it gets cleared.

  • Jessica Hawkwell @LadySerenaKitty commented Sep 30, 2017
    Master

    Looks more like the ADD instruction is messed up.

    CPU up...
    1000 : [      MOVS] 0011 0207 -> 0000 0000 0000 0000         0000 0002
        Writing  0 to 0000
        Writing  0 to 0001
    1008 : [      MOVS] 0011 0200 -> 0000 0000 0000 0000         0010 0001
        Writing  1 to 0010
        Writing  0 to 0011
    1010 : [       ADD] 0001 0201 -> 0000 0000 0000 0000         0000 0010
        Writing  0 to 0010
        Writing  0 to 0011
    Looks more like the `ADD` instruction is messed up. ``` CPU up... 1000 : [ MOVS] 0011 0207 -> 0000 0000 0000 0000 0000 0002 Writing 0 to 0000 Writing 0 to 0001 1008 : [ MOVS] 0011 0200 -> 0000 0000 0000 0000 0010 0001 Writing 1 to 0010 Writing 0 to 0011 1010 : [ ADD] 0001 0201 -> 0000 0000 0000 0000 0000 0010 Writing 0 to 0010 Writing 0 to 0011 ```
  • Jessica Hawkwell @LadySerenaKitty commented Sep 30, 2017
    Master

    Bad dereference initially, plus BasicMath wasn't writing the registers back.

    Bad dereference initially, plus `BasicMath` wasn't writing the registers back.
  • Jessica Hawkwell @LadySerenaKitty

    closed

    Sep 30, 2017

    closed

    closed
    Toggle commit list
  • Jessica Hawkwell @LadySerenaKitty

    assigned to @LadySerenaKitty

    Oct 05, 2017

    assigned to @LadySerenaKitty

    assigned to @LadySerenaKitty
    Toggle commit list
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
2
Labels
Bug Need Info
Assign labels
  • View labels
1
1 participant
Reference: LadySerenaKitty/kcpu#1