Implemented device cound and table filling

Also, ram_vars is rewrite to use .EQU for clarity and added a constants.asm file