Question: i have this project but it is not working as its supposed to be all i get is a green screen and then the two

i have this project but it is not working as its supposed to be all i get is a green screen and then the two sprites on a fixed postions here is my original description i have this project which is in assembly x86, ran on a platform made by our faculty. This is my last years project but this year i need to change it. I need your help to remake this one. My idea is instead of the board to have random ascii symbopls lets say hearts and circles that 2 of them(hearts) will fall vertically. and instead of the sprite circle make it a rectangle that will go left and right to catch the falling hearts. all three hearts drop after 3seconds, if you catch them alll win if not lose. also display the points in th keyboard section using keyboard intterupts. we are working in a x16 assebmmbly but platfrom is made by the university. here is a pic of the current img

JMP main JMP isr

;vars vsync: DW 0 stop_game: DW 0 move_left: DW 0 move_right: DW 0 catch: DW 0 score: DB 0

heart_x: DB 60 heart_y: DB 0 paddle_x: DB 60

;ir's isr: PUSH A IN 1 CMP A, 1 JE keyboard MOV [vsync], 1 JMP iret

keyboard: IN 6 CMPB AL, 'a' JNE check_d MOV [move_left], 1 JMP exit_keyboard

check_d: CMPB AL, 'd' JNE check_q MOV [move_right], 1 JMP exit_keyboard

check_q: CMPB AL, 'q' JNE iret MOV [stop_game], 1

exit_keyboard: MOV A, 1

iret: OUT 2 POP A IRET

; wait_next_frame wait_next_frame: PUSH A wait_loop: MOV A, [vsync] CMP A, 0 JE wait_loop MOV [vsync], 0 POP A RET

;draw_heart draw_heart: MOV A, 0xA306 OUT 8 MOV A, 0x0304 ; pink heart OUT 9

MOV A, 0xA308 OUT 8 MOV A, 0x5500 OUT 9 RET

;draw_paddle draw_paddle: MOV A, 0xA30A ; Paddle sprite ID OUT 8 MOV A, 0xFFF9 ; Blue paddle color OUT 9

MOV A, 0xA30C ; Paddle position register OUT 8 MOV A, 0x88F0 OUT 9 RET

;check_catch check_catch: ; Heart_y near 110 MOVB AL, [heart_y] CMPB AL, 110 JNE no_catch

; Heart_x within paddle_x 6 MOVB AH, [heart_x] MOVB BL, [paddle_x] SUBB BL, 6 CMPB AH, BL JB no_catch ADD B, 12 CMPB AH, BL JA no_catch

MOV B, [heart_y] INC B MOV [heart_y], B

no_catch: RET

main: MOV SP, 0x0FFF

; Set graphics mode MOV A, 1 OUT 7 MOV A, 0xA300 OUT 8 MOV A, 0x99 OUT 9

; Enable graphics interrupts MOV A, 5 OUT 0 STI

game_loop: ; Move paddle MOV B, [move_left] CMP B, 1 JNE check_right MOV B, [paddle_x] CMP B, 4 JBE reset_left SUB B, 4 MOV [paddle_x], B reset_left: MOV [move_left], 0

check_right: MOV B, [move_right] CMP B, 1 JNE move_heart MOV B, [paddle_x] CMP B, 116 JAE reset_right ADD B, 4 MOV [paddle_x], B reset_right: MOV [move_right], 0

move_heart: ; erase heart (optional: draw bg color over previous pos) ; Move heart down MOVB AL, [heart_y] ADDB AL, 4 MOVB [heart_y], AL CMPB AL, 120 JBE continue_fall

; Reset heart position MOV [heart_y], 0 MOVB AL, [heart_x] ADDB AL, 7 CMPB AL, 116 JBE keep_new MOVB AL, 20 keep_new: MOVB [heart_x], AL

; Check catch CALL check_catch

continue_fall: CALL draw_heart CALL draw_paddle CALL wait_next_frame

MOV A, [stop_game] CMP A, 1 JNE game_loop

game_over: HLT

i have this project but it is not working as its
16-bit Assembly Simulator - Google Chrome X 2% e.famnit.upr.si/pluginfile.php/737669/mod_resource/content/3/index.html View Speed > Assemble Stop > Step Reset 16-bit Assembler Simulator 7 move_left: DW 0 Memory Split Input / Output Devices 8 move_right : DW O 1 2 3 4 5 6 7 8 9 ABCDEF 9 catch: DW O 000 2 00 DB 2E 00 14 00 00 00 00 00 00 00 00 00 00 10 score : DB O 001 00 1B 64 00 3B 00 8A 00 01 28 00 00 01 34 00 28 11 002 08 00 06 00 01 2E 00 56 8A 00 06 20 08 61 36 00 12 heart_x : DB 60 003 39 08 00 0A 00 01 2E 00 52 2C 08 64 36 00 47 08 004 00 0C 00 01 2E 00 52 2C 08 71 36 00 56 08 00 08 13 heart_y : DB 0 005 00 01 06 00 00 01 8E 00 02 43 00 84 3B 00 03 00 14 paddle_x: DB 60 006 00 06 28 00 00 00 34 00 5E 08 00 06 00 00 43 00 15 007 47 06 00 A3 06 8E 00 08 06 00 03 04 8E 00 09 06 16 ;ir's 008 00 A3 08 8E 00 08 06 00 55 00 8E 00 09 47 06 00 17 isr : 009 A3 0A 8E 00 08 06 00 FF F9 8E 00 09 06 00 A3 OC 18 PUSH A OOA 8E 00 08 06 00 88 FO 8E 00 09 47 0B 08 00 12 2C 19 IN 1 OOB 08 6E 36 00 DA OB 07 00 11 OB QA 00 13 20 0A 06 O OOC 29 07 0A 30 00 DA 14 01 00 0C 29 07 0A 38 00 DA 20 CMP A, 1 OOD 03 01 00 12 21 01 05 00 1 0 12 01 47 06 04 OF FF 06 21 JE keyboard OOE 00 00 01 85 00 07 06 00 A3 00 8E 00 08 06 00 00 CPU Registers 22 MOV [vsync], 1 0OF 99 8E 00 09 06 00 00 05 8E 00 00 83 03 01 00 0A 23 JMP iret 010 28 01 00 01 36 01 1F 03 01 00 13 28 01 00 04 3A A 0000 B 0000 C 0000 D OOO0 24 011 01 1A 1C 01 00 04 05 00 13 01 08 00 0A 00 00 03 IP 0000 SP 0000 SR MCZFH 25 keyboard: 012 01 00 0C 28 01 00 01 36 01 42 03 01 00 13 28 01 26 IN 6 013 00 74 32 01 3D 14 01 00 04 05 00 13 01 08 00 0C 014 00 00 0B 08 00 12 18 08 04 0D 00 12 08 20 08 78 Input / Output Registers 27 CMPB AL, 'a' 015 3A 01 6F 08 00 12 00 00 0B 08 00 11 18 08 07 2C Address Name Value 28 INE check_d 016 08 74 3A 01 68 0E 08 1 00 11 08 46 00 AB 46 IRQMASK 0005 29 MOV [move_left], 1 017 00 71 46 00 8E 46 00 5C 03 00 00 08 28 00 00 01 30 JMP exit_keyboard 018 36 00 FC 00 00 00 00 00 00 0 00 90 90 00 00 00 0001 IRQSTATUS 0004 31 019 00 00 09 09 90 90 06 09 60 90 90 00 60 00 00 00 0002 IRQEOI 0004 32 check_d : 014 0 09 09 0 90 90 90 60 09 09 90 90 00 00 00 00 0003 TMRPRELOAD 33 CMPB AL, 'd' 01B 00 0 00 00 00 00 00 0 0 90 90 00 00 00 00 00 01C 00 00 90 60 90 60 90 60 90 09 90 00 90 00 00 00 0004 TMRCOUNTER 34 INE check_q 01D 60 00 00 60 60 0 90 60 00 60 60 90 90 00 00 00 35 MOV [move_right], 1 0005 KBDSTATUS 0000 36 JMP exit_keyboard 0006 KBDDATA 0000 01F 00 00 00 00 00 00 0 0 00 00 00 90 00 00 00 00 37 020 00 0 0 0 0 0 90 90 90 0 90 90 00 90 90 00 0007 VIDMODE 0001 021 00 00 00 00 90 90 90 90 90 00 00 00 00 90 00 00 2 25.C Partly sunny Q Search 9 ENG 2:50 PM 6/3/2025

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!