CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 10:16:04 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=94236d7adb1255d8db5ed5f4e6986dcce1035f270723c52b81c6931afda66f0ca%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22GaiRMjUrPg-Z-IB5CoYE14_ci0ADVNcW%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d5d6eeeefff424-BLR
;; vga_test.asm;; Created: 2/20/2016 6:44:02 PM; Author : jimlkosmo; - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; vga_test.asm
- ;
- ; Created: 2/20/2016 6:44:02 PM
- ; Author : jimlkosmo
- ;
- .org 0
- rjmp RESET ;reset
- .org OC1Aaddr
- rjmp TIM1_COMPA ;isr for tc1 Compare Match A
- .org OC1Baddr
- rjmp TIM1_COMPB ;isr for tc1 Compare Match B
- RESET:
- sbi ddrb,4 ; HORIZONTAL SYNC PULSE
- sbi ddrb,3 ;red
- sbi ddrb,2 ;green
- sbi ddrb,0 ;blue
- sbi ddrb,1 ; VERTICAL SYNC PULSE
- ldi r16,(1<<PORTB4); H_SYNC PIN HIGH
- out PORTB,r16
- in r16,PORTB; V_SYNC PIN LOW
- sbr r16,(0<<PORTB1)
- out PORTB,r16
- ;stack_pointer
- ldi r16,ramend
- out spl,r16
- ;setup interrupts
- clr r16
- ldi r16,(1<<COM1B0); Toggle in OC1B when Comp Match on OCR1B
- out TCCR1A,r16
- ldi r16,(1<<CS10 | 1<<WGM12) ;CTC on OCR1A Comp Match and set CLKin
- out TCCR1B,r16
- ldi r16,(1<<OCIE1A | 1<<OCIE1B) ;TC1 Output Comp Match Interrupt Enabled on A and B channel
- out timsk,r16
- ldi r16,high(635); Load Max for TC1
- out ocr1ah,r16
- ldi r16,low(635)
- out ocr1al,r16
- ldi r16,0
- out tcnt1h,r16; clear tc1
- out tcnt1l,r16
- ldi r16,high(12); Load first toggle value for H_SYNC (13 clock pulses)
- out ocr1bh,r16
- ldi r16,low(12)
- out ocr1bl,r16
- ldi r16,0
- out tcnt1h,r16; clear tc1
- out tcnt1l,r16
- ldi r18,10; Load r18 with the first value of vsync toggle
- ldi r19,44 ;[1] load r19 with the value of the first visible line
- ldi r20,0 ;[1]
- ldi r21,low(126); load r21,r22 with the value of the first visible pixel
- ldi r22,high(126)
- clr r28
- clr r29
- clr r16
- sei; interrupts globally enabled
- main:
- cp r28,r19 ;[1]
- cpc r29,r20 ;[1]
- brlo no_vid ;[1/2] Are we in vertical visible area?
- in r26,tcnt1l;
- in r27,tcnt1h
- cp r26,r21 ;[1]
- cpc r24,r22 ;[1]
- brlo no_vid ;[1/2] Are we in horizontal visible area?
- in r16,PORTB; white space
- sbr r16,(1<<PORTB0)|(1<<PORTB2)|(1<<PORTB3)
- out PORTB,r16
- rjmp main
- no_vid:
- in r16,PORTB; black space
- sbr r16,(0<<PORTB0)|(0<<PORTB2)|(0<<PORTB3)
- out PORTB,r16
- rjmp main
- TIM1_COMPA:
- in r16,sreg ; SAVE STATUS REGISTER [1]
- push r16;[2]
- ldi r16,low(12); Load first toggle value for H_SYNC (13 clock pulses) [1]
- ldi r17,high(12);
- out ocr1bh,r17;[2]
- out ocr1bl,r16
- adiw r29:r28,1 ;[2] V_SYNC counter++
- ldi r17,0 ;[1]
- cp r18,r28 ;[1]
- cpc r17,r29 ;[1]
- breq vsync_toggle ;[1/2] If we got 10 or 12 lines
- ldi r16,low(525) ;[1]
- ldi r17,high(525) ;[1]
- cp r16,r28 ;[1]
- cpc r17,r29 ;[1]
- breq cls_vsync ;[1/2] If we got 525 lines
- cont:
- pop r16 ;[2] RESTORE sreg
- out sreg,r16 ;1
- reti ;[4] return operation to software
- TIM1_COMPB:
- in r16,sreg ; SAVE STATUS REGISTER [1]
- push r16;[2]
- ldi r16,low(87); Load second toggle value for H_SYNC (13+76 clock pulses)
- out ocr1bl,r16
- pop r16 ;[2] RESTORE sreg
- out sreg,r16 ;1
- reti ;[4] return operation to software
- vsync_toggle:
- sbi PINB,1;toggle v_sync
- ldi r18,12 ;set r18 with 12
- rjmp cont
- cls_vsync:
- ldi r18,10 ;set r18 with 10
- ldi r28,0; reset v_sync counter
- ldi r29,0
- rjmp cont
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐
Java | 3 sec ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 4 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 5 sec ago | 0.10 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 9 sec ago | 0.10 KB
-
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐
Java | 11 sec ago | 0.10 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ F
JavaScript | 14 sec ago | 0.25 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 15 sec ago | 0.10 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 17 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand