Git Product home page Git Product logo

os-labs's People

Contributors

heliumyc avatar

Watchers

 avatar  avatar

os-labs's Issues

can't deal with sym too long error

input

1 sdfsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1 sdfsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0

output

Parse Error line 1 offset 3: SYM_EXPECTED

expected output

Parse Error line 1 offset 3: SYM_TOO_LONG

parse result error

When a symbol's relative value is too big, you only need to set the relative value to 0, not the absolute value.

1 x 10
1 x
5 R 2 I 10002 I 40008 I 0 R 3001
1 y 10
0
0

current output

Warning: Module 1: x too big 10 (max=4) assume zero relative
Warning: Module 2: y too big 15 (max=-1) assume zero relative
Symbol Table
x=0
y=0

Memory Map
000: 0002
001: 9999 Error: Illegal immediate value; treated as 9999
002: 9999 Error: Illegal immediate value; treated as 9999
003: 0000
004: 3001
Warning: Module 1: x appeared in the uselist but was not actually used

expected output

Warning: Module 1: x too big 10 (max=4) assume zero relative
Warning: Module 2: y too big 10 (max=0) assume zero relative
Symbol Table
x=0
y=5

Memory Map
000: 0002
001: 9999 Error: Illegal immediate value; treated as 9999
002: 9999 Error: Illegal immediate value; treated as 9999
003: 0000
004: 3001
Warning: Module 1: x appeared in the uselist but was not actually used

case of all zeros

edge case for all zero, should not print anything?

input

0 0 0

output

Symbol Table

Memory Map

expected output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.