While making an assembly project, we encountered a problem with the screen. Its very similar to the “Space Invaders” game. We print on it by using the ‘video graphic mode’ of the ‘int 10h’.
I have read in previous questions that the solution is to print in one screen, and then change to another, but after trying for several days, reading how the interruption works, im still not able to solve it.this is how the game looks like
To print and mimic movement, we do the following: 1st we print the enemies, 2do we print the spaceship (blue thing down below), 3rd we added a delay function, 4th call a function that checks keyboard buffer for keys to move the spaceship or shoot.
delay function:
delay proc
push ax
push bx
xor ax, ax
xor bx, bx
mov ax, cx ;in cx comes a number depending on the lvl, it begins at 1300
ret2:
dec ax
jz finDec
mov bx, cx
ret1:
dec bx
jnz ret1
jmp ret2
finDec:
pop bx
pop ax
ret
delay endp
If you could foward me with examples of how to print on one screen and then change to another, it might help!
Thank you 🙂
Tried printing in page 1, and then change to 0, maybe did it wrong, but didnt work
Nicolás is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.