当前位置: 首页>>代码示例>>C++>>正文


C++ output_byte函数代码示例

本文整理汇总了C++中output_byte函数的典型用法代码示例。如果您正苦于以下问题:C++ output_byte函数的具体用法?C++ output_byte怎么用?C++ output_byte使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了output_byte函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: transfer

/*
 * This routine is called when everything should be correctly set up
 * for the transfer (ie floppy motor is on and the correct floppy is
 * selected).
 */
static void transfer(void) {

	read_track = (command == FD_READ) && (CURRENT_ERRORS < 4) &&
	    (floppy->sect <= MAX_BUFFER_SECTORS);

	configure_fdc_mode();
	if (reset) {
		redo_fd_request();
		return;
	}

	if (!seek) {
		setup_rw_floppy();
		return;
	}

	do_floppy = seek_interrupt;
	output_byte(FD_SEEK);
	if (read_track)
		output_byte(current_drive);
	else
		output_byte((head<<2) | current_drive);

	output_byte(seek_track);
	if (reset)
		redo_fd_request();
}
开发者ID:hozmaster,项目名称:octaneos,代码行数:32,代码来源:floppy.c

示例2: dumpsw

/**
 * dump switch table
 */
void dumpsw(WHILE *ws) {
        int     i,j;

        data_segment_gdata ();
        generate_label (ws->body_tab);
        if (ws->case_test != swstp) {
                j = ws->case_test;
                while (j < swstp) {
                        gen_def_word ();
                        i = 4;
                        while (i--) {
                                output_number (swstcase[j]);
                                output_byte (',');
                                print_label (swstlab[j++]);
                                if ((i == 0) | (j >= swstp)) {
                                        newline ();
                                        break;
                                }
                                output_byte (',');
                        }
                }
        }
        gen_def_word ();
        print_label (ws->incr_def);
        output_string (",0");
        newline ();
        code_segment_gtext ();
}
开发者ID:beretta42,项目名称:FUZIX,代码行数:31,代码来源:stmt.c

示例3: reset_interrupt

/*
 * Must do 4 FD_SENSEIs after reset because of ``drive polling''.
 */
static void reset_interrupt(void)
{
    short i;

    for (i=0; i<4; i++) {
        output_byte(FD_SENSEI);
        (void) result();
    }
    output_byte(FD_SPECIFY);
    output_byte(cur_spec1);		/* hut etc */
    output_byte(6);			/* Head load time =6ms, DMA */
    configure_fdc_mode();		/* reprogram fdc */
    if (initial_reset_flag) {
        initial_reset_flag = 0;
        recalibrate = 1;
        reset = 0;
        return;
    }
    if (!recover)
        redo_fd_request();
    else {
        recalibrate_floppy();
        recover = 0;
    }
}
开发者ID:piece-the-world,项目名称:AndroidTest,代码行数:28,代码来源:floppy.c

示例4: dumpsw

/**
 * dump switch table
 */
dumpsw(loop_t *loop) {
        int     i,j;

        data_segment_gdata ();
        generate_label (loop->body_label);
        if (loop->test_label != swstp) {
                j = loop->test_label;
                while (j < swstp) {
                        gen_def_word ();
                        i = 4;
                        while (i--) {
                                output_number (swstcase[j]);
                                output_byte (',');
                                print_label (swstlab[j++]);
                                if ((i == 0) | (j >= swstp)) {
                                        newline ();
                                        break;
                                }
                                output_byte (',');
                        }
                }
        }
        gen_def_word ();
        print_label (loop->cont_label);
        output_string (",0");
        newline ();
        code_segment_gtext ();
}
开发者ID:AtomSoftTech,项目名称:retrobsd,代码行数:31,代码来源:stmt.c

示例5: shake_one

static void shake_one(void) {
	if (retry_recal(shake_one)) return;
	do_floppy = shake_done;
	output_byte(FD_SEEK);
	output_byte(head << 2 | current_drive);
	output_byte(1);
}
开发者ID:hozmaster,项目名称:octaneos,代码行数:7,代码来源:floppy.c

示例6: hd44780_clear

void hd44780_clear()
{
    output_byte(0, CMD_CLEAR_DISPLAY(), 1);

#ifdef HD44780_MULTIENSUPPORT
    output_byte(0, CMD_CLEAR_DISPLAY(), 2);
#endif
}
开发者ID:NeoBelerophon,项目名称:ethersex,代码行数:8,代码来源:hd44780_core.c

示例7: retry_recal

static int retry_recal(void (*proc)(void)) {

	output_byte(FD_SENSEI);
	if (result() == 2 && (ST0 & 0x10) != 0x10) return 0;
	do_floppy = proc;
	output_byte(FD_RECALIBRATE);
	output_byte(head<<2 | current_drive);
	return 1;
}
开发者ID:hozmaster,项目名称:octaneos,代码行数:9,代码来源:floppy.c

示例8: recalibrate_floppy

static void recalibrate_floppy(void) {

	recalibrate = 0;
	current_track = 0;
	do_floppy = recal_interrupt;
	output_byte(FD_RECALIBRATE);
	output_byte(head<<2 | current_drive);
	if (reset)
		redo_fd_request();
}
开发者ID:hozmaster,项目名称:octaneos,代码行数:10,代码来源:floppy.c

示例9: configure_fdc_mode

/*
 * This has only been tested for the case fdc_version == FDC_TYPE_STD.
 * In case you have a 82077 and want to test it, you'll have to compile
 * with `FDC_FIFO_UNTESTED' defined. You may also want to add support for
 * recognizing drives with vertical recording support.
 */
static void configure_fdc_mode(void)
{
	if (fdc_version == FDC_TYPE_82077) {
		/* Enhanced version with FIFO & vertical recording. */
		output_byte(FD_CONFIGURE);
		output_byte(0);
		output_byte(0x1A);	/* FIFO on, polling off, 10 byte treshold */
		output_byte(0);		/* precompensation from track 0 upwards */
		printk(DEVICE_NAME ": FIFO enabled\n");
	}
} /* configure_fdc_mode */
开发者ID:binsys,项目名称:doc-linux,代码行数:17,代码来源:floppy.c

示例10: hd44780_init

void hd44780_init(void)
{

    /* init io pins */
    CTRL_OUTPUT();
    PIN_CLEAR(HD44780_RS);
    PIN_CLEAR(HD44780_EN);
#ifdef HAVE_HD44780_RW
    PIN_CLEAR(HD44780_RW);
#endif
    PIN_CLEAR(HD44780_D4);
    PIN_CLEAR(HD44780_D5);
    PIN_CLEAR(HD44780_D6);
    PIN_CLEAR(HD44780_D7);
    DATA_OUTPUT();

    _delay_ms(40);
    PIN_SET(HD44780_D4);
    PIN_SET(HD44780_D5);
    clock_write();

    _delay_ms(4);
    clock_write();

    _delay_ms(1);
    clock_write();

    /* init done */
    _delay_ms(1);
    PIN_CLEAR(HD44780_D4);
    clock_write();
    _delay_ms(1);

    /* configure for 4 bit, 2 lines, 5x9 font (datasheet, page 24) */
    output_byte(0, CMD_FUNCTIONSET(0, 1, 0));

    /* turn on display, cursor and blinking */
    hd44780_config(0,0);

    /* clear display */
    hd44780_clear();

    /* set shift and increment */
    output_byte(0, CMD_ENTRY_MODE(1, 0));

    /* set ddram address */
    output_byte(0, CMD_SETDRAMADR(0));

    /* open file descriptor */
    lcd = fdevopen(hd44780_put, NULL);
    
    /* set current virtual postion */
    current_pos = 0;
}
开发者ID:benson-zerties,项目名称:ethersex,代码行数:54,代码来源:hd44780.c

示例11: hd44780_define_char

void
hd44780_define_char(uint8_t n_char, uint8_t *data, uint8_t en)
{
    if (n_char > 7) return;
    /* set cgram pointer to char number n */
    output_byte(0, CMD_SETCRAMADR(n_char * 8), en);
    n_char = 0;
    while (n_char < 8) {
        /* send the data to lcd into cgram */
        output_byte(1, *(data + n_char), en);
        n_char++;
    }
}
开发者ID:NeoBelerophon,项目名称:ethersex,代码行数:13,代码来源:hd44780_core.c

示例12: floppy_on_interrupt

static void floppy_on_interrupt(void)
{
	if (inb(FD_DIR) & 0x80) {
		changed_floppies |= 1<<current_drive;
		buffer_track = -1;
		if (keep_data[current_drive]) {
			if (keep_data[current_drive] > 0)
				keep_data[current_drive]--;
		}
		else {
			if (ftd_msg[current_drive] && current_type[
			    current_drive] != NULL)
				printk("Disk type is undefined after disk "
				    "change in fd%d\r\n",current_drive);
			current_type[current_drive] = NULL;
			floppy_sizes[current_drive] = MAX_DISK_SIZE;
		}
/* Forcing the drive to seek makes the "media changed" condition go away.
 * There should be a cleaner solution for that ...
 */
		if (!reset && !recalibrate) {
			do_floppy = (current_track && current_track != NO_TRACK)
			    ?  shake_zero : shake_one;
			output_byte(FD_RECALIBRATE);
			output_byte(head<<2 | current_drive);
			return;
		}
	}
	if (reset) {
		reset_floppy();
		return;
	}
	if (recalibrate) {
		recalibrate_floppy();
		return;
	}
/* We cannot do a floppy-select, as that might sleep. We just force it */
	selected = 1;
	if (current_drive != (current_DOR & 3)) {
		seek = 1;
		current_track = NO_TRACK;
		current_DOR &= 0xFC;
		current_DOR |= current_drive;
		outb(current_DOR,FD_DOR);
		add_timer(2,&transfer);
	} else
		transfer();
}
开发者ID:binsys,项目名称:doc-linux,代码行数:48,代码来源:floppy.c

示例13: gen_call

/**
 * call the specified subroutine name
 * @param sname subroutine name
 */
void gen_call(char *sname) {
    output_with_tab ("call ");
    output_string (sname);
    output_byte(',');
    output_number(args);
    newline ();
}
开发者ID:EtchedPixels,项目名称:FUZIX,代码行数:11,代码来源:codegeneric.c

示例14: copy_from_history

static void copy_from_history(LHAPM2Decoder *decoder, unsigned int code,
                              uint8_t *buf, size_t *buf_len)
{
	int to_copy, offset;
	unsigned int i, pos, start;

	// Read number of bytes to copy and offset within history to copy
	// from.

	to_copy = history_get_count(decoder, code);
	offset = history_get_offset(decoder, code);

	if (to_copy < 0 || offset < 0) {
		return;
	}

	// Sanity check to prevent the potential for buffer overflow.

	if (to_copy > OUTPUT_BUFFER_SIZE) {
		return;
	}

	// Perform copy.

	start = decoder->ringbuf_pos + RING_BUFFER_SIZE - 1
	      - (unsigned int) offset;

	for (i = 0; i < (unsigned int) to_copy; ++i) {
		pos = (start + i) % RING_BUFFER_SIZE;

		output_byte(decoder, buf, buf_len, decoder->ringbuf[pos]);
	}
}
开发者ID:djdron,项目名称:zxtune,代码行数:33,代码来源:pm2_decoder.c

示例15: dumpglbs

/**
 * dump all static variables
 */
void dumpglbs(void) {
    int dim, i, list_size, line_count, value;
    if (!glbflag)
        return;
    current_symbol_table_idx = rglobal_table_index;
    while (current_symbol_table_idx < global_table_index) {
        SYMBOL *symbol = &symbol_table[current_symbol_table_idx];
        if (symbol->identity != FUNCTION) {
            ppubext(symbol);
            if (symbol->storage != EXTERN) {
                output_string(symbol->name);
                output_label_terminator();
                dim = symbol->offset;
                list_size = 0;
                line_count = 0;
                if (find_symbol_initials(symbol->name)) { // has initials
                    list_size = get_size(symbol->name);
                    if (dim == -1) {
                        dim = list_size;
                    }
                }
                for (i=0; i<dim; i++) {
                    if (symbol->type == STRUCT) {
                        dump_struct(symbol, i);
                    } else {
                        if (line_count % 10 == 0) {
                            newline();
                            if ((symbol->type & CINT) || (symbol->identity == POINTER)) {
                                gen_def_word();
                            } else {
                                gen_def_byte();
                            }
                        }
                        if (i < list_size) {
                            // dump data
                            value = get_item_at(symbol->name, i, &tag_table[symbol->tagidx]);
                            output_number(value);
                        } else {
                            // dump zero, no more data available
                            output_number(0);
                        }
                        line_count++;
                        if (line_count % 10 == 0) {
                            line_count = 0;
                        } else {
                            if (i < dim-1) {
                                output_byte( ',' );
                            }
                        }
                    }
                }
                newline();
            }
        } else {
            fpubext(symbol);
        }
        current_symbol_table_idx++;
    }
}
开发者ID:JamesLinus,项目名称:FUZIX,代码行数:62,代码来源:main.c


注:本文中的output_byte函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。