; Contrast, tim gerla ; new revision by JKKN ; FargoC example program @program prog_code,prog_name include macros.h ;************** Start of Fargo program ************** prog_code: jsr flib[clr_scr] move #2,d0 ;required version ; move #2,d0 ;uncomment this and comment above ;line to test the is_ver function. jsr fargoc[is_ver] ;check cmp #0,d0 ;ok? beq done ;no?! goto end SetFont #1 WriteStr #10,#10,#1,prompt WriteStr #10,#20,#1,prompt1 WriteStr #10,#40,#0,test WriteStr #10,#50,#1,test WriteStr #10,#60,#2,test WriteStr #10,#70,#3,test WriteStr #10,#80,#4,test WriteStr #10,#90,#1,test begin: jsr flib[idle_loop] cmp.b #13,d0 beq done cmp.b #338,d0 beq cup cmp.b #344,d0 beq cdown cmp.b #264,d0 beq done bra begin cup: clr.b d2 jsr fargoc[fadeup] bra lop_l lop_b: move.w #$8000,d7 jsr fargoc[delay] jsr fargoc[contrast_down] lop_l: ; should properly be in library too..! jsr fargoc[getcontrast] cmp.b d2,d1 bne lop_b bra begin cdown: clr.b d2 jsr fargoc[fadedown] bra lop2_l lop2_b: move.w #$8000,d7 jsr fargoc[delay] jsr fargoc[contrast_up] lop2_l: ; should properly be in library too..! jsr fargoc[getcontrast] cmp.b d2,d1 bne lop2_b bra begin done: rts ;************************************************** prog_name: dc.b "Contrast, Tim Gerla & JKKN",0 prompt dc.b "Press [UP] and [DOWN] to ",0 prompt1 dc.b "see fade",0 test dc.b "Test--Test--Test--Test--Test--Test--",0 ;************** End of Fargo program **************** reloc_open add_library flib add_library fargoc add_library romlib reloc_close end