Test Programs - testing symbol implementation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Test Programs - testing symbol implementation

AlexSo
The test programs supplied clearly test for symbol labels and jumping implementation, but I don't think they test for RAM address (static variables) symbol implementation. Am I right?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Test Programs - testing symbol implementation

cadet1620
Administrator
projects/06/pong/Pong.asm has RAM variables. If your generated .hack matches the one generated by Assembler then yours is working correctly.


FWIW, my assembler generates a listing file including symbol table and cross references.  
Data Symbols

24576 D  KBD
   18 D  math.0
             6553 6559 6650 6677 6716 7065 7157 7933 8189
   17 D  math.1
             6530 7427 7537 7572 7642 7660 7690 7756 7875 7981
   19 D  memory.0
             8460 8468 8513 8565 8597
   23 D  output.0
             9895 19487 19525 19548 19748 19766 19788 20057 20080 20147 20168 20186
             20219
   22 D  output.1
             9886 19056 19539 19768 19786 20040 20071 20094 20126 20188 20206 20221
             20253 20255 20275
   21 D  output.2
             9875 18925 19093 19579 19732 19830 19842 20092 20134 20284 20298
   24 D  output.3
             9918 19981 20011
   20 D  output.4
             9863 19113 19168 19217
   25 D  output.5
             9981 17878 18533 18945
   26 D  output.6
             18486 18594 18983
   16 D  ponggame.0
             4523 4531
16384 D  SCREEN
   29 D  screen.0
             20377 20383 20474 20501 20540 21158 22704 22768 23691 23754
   27 D  screen.1
             20342 20634 20721 20739 20805 20823
   28 D  screen.2
             20354 20701 20899

Code Symbols

 5877 C  array.dispose
             25297 27015
 5808 C  array.new
             6519 6542 9970 17857 18475 18572 20366 25206 26367
...

Code size = 27483 (0x6B5B)
Data size =    30 (0x001E)
--Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Test Programs - testing symbol implementation

AlexSo
That's strange as I didn't implement RAM address (static variables) symbols (I overlooked this). Yet my hack code passed the test when it was compared in the Assembler.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Test Programs - testing symbol implementation

cadet1620
Administrator
That is indeed very strange.

What code value was being written during pass 2 when A-command symbols were not found in the symbol table?

--Mark
Loading...