Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    422930

Untitled

Sign in to follow this  
Evil Steve

59 views

Whee, looping constructs and function calls work in DruinkASM / DruinkVM now. I'm using the x86 EFLAGS sort of method, where there's a CMP instruction which sets the equal, less than and greater than flags when you compare two variables, and then there's JE, JNE, JG etc.

Hopefully I'll get all the current opcodes implemented in the VM by the weekend, then I can work on the debugger. I've already found a few occasions that I'd want to cause a debug breakpoint, such as when you try to add an integer and a string, or something like that. DruinkScript won't coerce the variables directly, I'll add an opcode to do that for me. That should be more robust I think, and since I won't be writing assembly scripts often (If at all), it won't matter. It should also be faster than converting ints to strings and suchlike whenever I need. And means less code.

Stuff to do with the debugger:

  • Support debug breakpoints, which will show the instruction that caused the break

  • Allow viewing of the stack and registers

  • Allow stepping through since instructions and chunks of instructions - For when the compiler is done and one statement may result in several instructions.

  • Allow changing registers and variables, both the type and the value of them

  • Support socket connections to the debugger server for remote debugging, and to allow a debugger to be a completely seperate application



I also finally remembered what the other preprocessor define was for compiling DruinkScript: DRUINKSCRIPT_NO_ERROR_STRINGS which removes the function for converting error codes to const char*'s. Pointless if the app isn't in English, or you're not going to display error strings anyway. I'll also need a preprocessor things for enabling / disabling the debugger.

That'll do for now. Back to work...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!