home *** CD-ROM | disk | FTP | other *** search
- #include <cpu_prog_model.h>
-
- void init_screen(),
- clear_screen();
-
- short display_page();
-
- extern char *dub_screen [];
-
- void home( code)
- PM *code;
- {
- unsigned short int address;
-
- if (!dub_screen [0] || !dub_screen [1])
- init_screen();
- else
- clear_screen();
-
- code->Me [0x25] = code->Me [0x22];
- code->Me [0x24] = 0;
-
- for (address = 0x0400;address < 0x0800;address ++)
- if (display_page( address) )
- code->Me [address] = 0xA0;
- }
-
- void bascalc( vertical, code)
- short vertical;
- PM * code;
- {
- short temp_value;
-
- code->Me [0x29] = ( (vertical >> 1) & 0x3) | 0x4;
-
- if (vertical & 0x1)
- code->Me [0x28] = temp_value = ((vertical & 0x18) + 0x80) & 0xFF;
- else
- code->Me [0x28] = temp_value = vertical & 0x18;
-
- code->Ca = (temp_value & 0x40) == 0x40;
- code->Ac = (code->Me [0x28] |= ( (temp_value << 2) & 0xFF) );
- }
-
- void wait( code)
- PM *code;
- {
- /* printf("<Wait.>\n");*/
- code->Ac = 0;
- }
-
-