Lines Matching refs:buf2

71 	byte buf2[512];  in pcdos_to_apricot()  local
73 memset(buf2, 0, sizeof(buf2)); in pcdos_to_apricot()
77 memcpy(buf2, buf + 0x150, 0xA0); /* Copy in saved sector */ in pcdos_to_apricot()
92 memcpy(buf2, apricot_dummy, sizeof(apricot_dummy)); in pcdos_to_apricot()
93 memcpy(buf2, buf + 3, 8); /* OEM ID */ in pcdos_to_apricot()
94 buf2[0x10] = buf[0x18]; /* Count of sectors */ in pcdos_to_apricot()
95 buf2[0x11] = buf[0x19]; in pcdos_to_apricot()
96 buf2[0x12] = (byte)(cylinders & 0xFF); in pcdos_to_apricot()
97 buf2[0x13] = (byte)((cylinders >> 8) & 0xFF); in pcdos_to_apricot()
98 buf2[0x14] = (byte)((cylinders >> 16) & 0xFF); in pcdos_to_apricot()
99 buf2[0x15] = (byte)((cylinders >> 24) & 0xFF); in pcdos_to_apricot()
100 buf2[0x16] = buf[0x1A]; /* Count of heads */ in pcdos_to_apricot()
103 buf2[0x28] = (byte)(dataoff & 0xFF); in pcdos_to_apricot()
104 buf2[0x29] = (byte)((dataoff >> 8) & 0xFF); in pcdos_to_apricot()
105 buf2[0x2a] = (byte)((dataoff >> 16) & 0xFF); in pcdos_to_apricot()
106 buf2[0x2b] = (byte)((dataoff >> 24) & 0xFF); in pcdos_to_apricot()
108 memcpy(buf2 + 0x50, buf + 0x0b, 13); /* BPB */ in pcdos_to_apricot()
113 buf2[0x54] = 0; in pcdos_to_apricot()
114 else buf2[0x54] = 1; in pcdos_to_apricot()
116 else buf2[0x54] = 2; in pcdos_to_apricot()
119 memcpy(buf2 + 0x144, pcd_magic, sizeof(pcd_magic)); in pcdos_to_apricot()
120 memcpy(buf2 + 0x150, buf, 0xA0); in pcdos_to_apricot()
122 memcpy(buf, buf2, sizeof(buf2)); in pcdos_to_apricot()
130 byte buf2[512]; in apricot_to_pcdos() local
132 memset(buf2, 0, sizeof(buf2)); in apricot_to_pcdos()
136 memcpy(buf2, buf + 0x150, 0xA0); /* Copy in saved sector */ in apricot_to_pcdos()
137 memcpy(buf2, pcdos_dummy, 3); /* and patch its code to be */ in apricot_to_pcdos()
138 memcpy(buf2 + 0x40, pcdos_dummy + 0x40, 4); in apricot_to_pcdos()
146 memcpy(buf2, pcdos_dummy, sizeof(pcdos_dummy)); in apricot_to_pcdos()
147 memcpy(buf2 + 3, buf, 8); /* OEM ID */ in apricot_to_pcdos()
148 memcpy(buf2 + 0x0b, buf + 0x50, 13); /* BPB */ in apricot_to_pcdos()
149 buf2[24] = sectors & 0xFF; in apricot_to_pcdos()
150 buf2[25] = sectors >> 8; in apricot_to_pcdos()
151 buf2[26] = heads & 0xFF; in apricot_to_pcdos()
152 buf2[27] = heads >> 8; in apricot_to_pcdos()
155 memcpy(buf2 + 0x144, apri_magic, sizeof(apri_magic)); in apricot_to_pcdos()
156 memcpy(buf2 + 0x150, buf, 0xA0); in apricot_to_pcdos()
157 buf2[0x1FE] = 0x55; in apricot_to_pcdos()
158 buf2[0x1FF] = 0xAA; /* Boot record signature */ in apricot_to_pcdos()
160 memcpy(buf, buf2, sizeof(buf2)); in apricot_to_pcdos()