Hello, as y'all know, I'm learning assembly, and thing were going good (I've had a moving sprite previously).
But now, in my objective of initialize the graphics and video modes, I am stuck with this problem: After disabling the display, and doing some things (clearing up the VRAM with $00 and loading graphics in it) , when I go to enable the display again through VDP Register 1, I get kicked out of the out instruction and instead directly jump to somewhere VERY early (maybe one of the BIOS routines). Strangest of all is that then sometime I get back, and continue the program, only that the writing to the VDP register 1 has been skipped, not letting me display the elements and as a result, the display is still disabled.
The error occurs somewhere around here:

and here's a video of me debugging the program:
https://youtu.be/JHbAVeNsquE
(The jump occurs around the 0:50 mark)
Any help? Also, I'm using SJASM
Late edit: Oh, I also forgot to say this:
IDEFINE SetVDPRegister(value,reg) ld b,value\ ld e,reg+128\ out (c),b\ nop\ out (c),e\ nop

