ganesshk wrote
Is there any specific reason why there is no modulo(%) operator in the Jack language?
Maybe we can add a method mod(x, y) to Math module
Jack was designed to be a minimal, but useable, object oriented programming language. It would be extra programming work for the students if they had to support '%' in the compiler they write in projects 10-11, and to write the Math.mod function in the OS they write in project 12.
Although it is less efficient than a direct implementation, a%b can be done as a-(a/b*b).
As a Chapter 13 project, you could add Math.mod(x, y) to your OS and support the '%' operator in your Jack compiler.
--Mark