@@ -205,20 +205,20 @@ static double real_exponent(double value, int &exponent)
205
205
// Print string in ITM format.
206
206
// Return next data address.
207
207
//
208
- unsigned Processor::e64_print_itm (unsigned addr0 , unsigned addr1 )
208
+ unsigned Processor::e64_print_itm (unsigned start_addr , unsigned end_addr )
209
209
{
210
- BytePointer bp (memory, addr0 );
210
+ BytePointer bp (memory, start_addr );
211
211
uint8_t last_ch = GOST_SPACE;
212
212
213
213
while (bp.word_addr ) {
214
214
// No data to print.
215
- if (addr1 && bp.word_addr == addr1 + 1 ) {
215
+ if (end_addr && bp.word_addr == end_addr + 1 ) {
216
216
return bp.word_addr ;
217
217
}
218
218
219
219
// No space left on the line.
220
220
if (e64_position == LINE_WIDTH) {
221
- if (!addr1 ) {
221
+ if (!end_addr ) {
222
222
if (bp.byte_index ) {
223
223
++bp.word_addr ;
224
224
}
@@ -265,27 +265,27 @@ unsigned Processor::e64_print_itm(unsigned addr0, unsigned addr1)
265
265
// Print word(s) in octal format.
266
266
// Return next data address.
267
267
//
268
- unsigned Processor::e64_print_octal (unsigned addr0 , unsigned addr1 , unsigned digits, unsigned width ,
269
- unsigned repeat)
268
+ unsigned Processor::e64_print_octal (unsigned start_addr , unsigned end_addr , unsigned digits,
269
+ unsigned width, unsigned repeat)
270
270
{
271
271
if (digits > 16 ) {
272
272
digits = 16 ;
273
273
}
274
- while (addr0 ) {
274
+ while (start_addr ) {
275
275
// No data to print.
276
- if (addr1 && addr0 == addr1 + 1 ) {
277
- return addr0 ;
276
+ if (end_addr && start_addr == end_addr + 1 ) {
277
+ return start_addr ;
278
278
}
279
279
280
280
// No space left on the line.
281
281
if (e64_position >= LINE_WIDTH) {
282
- if (!addr1 ) {
282
+ if (!end_addr ) {
283
283
return 0 ;
284
284
}
285
- return addr0 ;
285
+ return start_addr ;
286
286
}
287
- Word word = machine.mem_load (addr0 );
288
- ++addr0 ;
287
+ Word word = machine.mem_load (start_addr );
288
+ ++start_addr ;
289
289
290
290
word <<= 64 - digits * 3 ;
291
291
for (unsigned i = 0 ; i < digits; ++i) {
@@ -294,7 +294,7 @@ unsigned Processor::e64_print_octal(unsigned addr0, unsigned addr1, unsigned dig
294
294
}
295
295
296
296
if (!repeat) {
297
- return addr0 ;
297
+ return start_addr ;
298
298
}
299
299
--repeat;
300
300
if (width > digits) {
@@ -308,8 +308,8 @@ unsigned Processor::e64_print_octal(unsigned addr0, unsigned addr1, unsigned dig
308
308
// Print word(s) in hexadecimal format.
309
309
// Return next data address.
310
310
//
311
- unsigned Processor::e64_print_hex (unsigned addr0 , unsigned addr1 , unsigned digits, unsigned width ,
312
- unsigned repeat)
311
+ unsigned Processor::e64_print_hex (unsigned start_addr , unsigned end_addr , unsigned digits,
312
+ unsigned width, unsigned repeat)
313
313
{
314
314
static const char hex_digit[16 ] = {
315
315
GOST_0, GOST_1, GOST_2, GOST_3, GOST_4, GOST_5, GOST_6, GOST_7,
@@ -319,21 +319,21 @@ unsigned Processor::e64_print_hex(unsigned addr0, unsigned addr1, unsigned digit
319
319
if (digits > 12 ) {
320
320
digits = 12 ;
321
321
}
322
- while (addr0 ) {
322
+ while (start_addr ) {
323
323
// No data to print.
324
- if (addr1 && addr0 == addr1 + 1 ) {
325
- return addr0 ;
324
+ if (end_addr && start_addr == end_addr + 1 ) {
325
+ return start_addr ;
326
326
}
327
327
328
328
// No space left on the line.
329
329
if (e64_position >= LINE_WIDTH) {
330
- if (!addr1 ) {
330
+ if (!end_addr ) {
331
331
return 0 ;
332
332
}
333
- return addr0 ;
333
+ return start_addr ;
334
334
}
335
- Word word = machine.mem_load (addr0 );
336
- ++addr0 ;
335
+ Word word = machine.mem_load (start_addr );
336
+ ++start_addr ;
337
337
338
338
word <<= 64 - digits * 4 ;
339
339
for (unsigned i = 0 ; i < digits; ++i) {
@@ -343,7 +343,7 @@ unsigned Processor::e64_print_hex(unsigned addr0, unsigned addr1, unsigned digit
343
343
}
344
344
345
345
if (!repeat) {
346
- return addr0 ;
346
+ return start_addr ;
347
347
}
348
348
--repeat;
349
349
if (width > digits) {
@@ -357,33 +357,33 @@ unsigned Processor::e64_print_hex(unsigned addr0, unsigned addr1, unsigned digit
357
357
// Print CPU instruction(s).
358
358
// Return next data address.
359
359
//
360
- unsigned Processor::e64_print_instructions (unsigned addr0 , unsigned addr1 , unsigned width,
360
+ unsigned Processor::e64_print_instructions (unsigned start_addr , unsigned end_addr , unsigned width,
361
361
unsigned repeat)
362
362
{
363
- while (addr0 ) {
363
+ while (start_addr ) {
364
364
// No data to print.
365
- if (addr1 && addr0 == addr1 + 1 ) {
366
- return addr0 ;
365
+ if (end_addr && start_addr == end_addr + 1 ) {
366
+ return start_addr ;
367
367
}
368
368
369
369
// No space left on the line.
370
370
if (e64_position >= LINE_WIDTH) {
371
- if (!addr1 ) {
371
+ if (!end_addr ) {
372
372
return 0 ;
373
373
}
374
- return addr0 ;
374
+ return start_addr ;
375
375
}
376
- Word word = machine.mem_load (addr0 );
376
+ Word word = machine.mem_load (start_addr );
377
377
unsigned a = word >> 24 ;
378
378
unsigned b = word & BITS (24 );
379
- ++addr0 ;
379
+ ++start_addr ;
380
380
381
381
e64_print_cmd (a);
382
382
e64_putchar (GOST_SPACE);
383
383
e64_print_cmd (b);
384
384
385
385
if (!repeat) {
386
- return addr0 ;
386
+ return start_addr ;
387
387
}
388
388
--repeat;
389
389
if (width > 23 ) {
@@ -397,30 +397,30 @@ unsigned Processor::e64_print_instructions(unsigned addr0, unsigned addr1, unsig
397
397
// Print real number(s).
398
398
// Return next data address.
399
399
//
400
- unsigned Processor::e64_print_real (unsigned addr0 , unsigned addr1 , unsigned digits, unsigned width ,
401
- unsigned repeat)
400
+ unsigned Processor::e64_print_real (unsigned start_addr , unsigned end_addr , unsigned digits,
401
+ unsigned width, unsigned repeat)
402
402
{
403
403
if (digits > 20 ) {
404
404
digits = 20 ;
405
405
}
406
406
if (digits < 4 ) {
407
407
digits = 4 ;
408
408
}
409
- while (addr0 ) {
409
+ while (start_addr ) {
410
410
// No data to print.
411
- if (addr1 && addr0 == addr1 + 1 ) {
412
- return addr0 ;
411
+ if (end_addr && start_addr == end_addr + 1 ) {
412
+ return start_addr ;
413
413
}
414
414
415
415
// No space left on the line.
416
416
if (e64_position >= LINE_WIDTH) {
417
- if (!addr1 ) {
417
+ if (!end_addr ) {
418
418
return 0 ;
419
419
}
420
- return addr0 ;
420
+ return start_addr ;
421
421
}
422
422
423
- Word word = machine.mem_load (addr0 );
423
+ Word word = machine.mem_load (start_addr );
424
424
bool negative = (word & BIT41);
425
425
double value = 0 ;
426
426
int exponent = 0 ;
@@ -432,7 +432,7 @@ unsigned Processor::e64_print_real(unsigned addr0, unsigned addr1, unsigned digi
432
432
}
433
433
value = real_exponent (value, exponent);
434
434
}
435
- ++addr0 ;
435
+ ++start_addr ;
436
436
437
437
e64_putchar (GOST_SPACE);
438
438
e64_putchar (negative ? GOST_MINUS : GOST_PLUS);
@@ -464,11 +464,11 @@ unsigned Processor::e64_print_real(unsigned addr0, unsigned addr1, unsigned digi
464
464
e64_putchar (exponent % 10 );
465
465
466
466
if (!repeat) {
467
- if (addr1 && addr0 <= addr1 ) {
467
+ if (end_addr && start_addr <= end_addr ) {
468
468
e64_emit_line ();
469
469
repeat = 1 ;
470
470
} else {
471
- return addr0 ;
471
+ return start_addr ;
472
472
}
473
473
}
474
474
--repeat;
@@ -483,17 +483,17 @@ unsigned Processor::e64_print_real(unsigned addr0, unsigned addr1, unsigned digi
483
483
// Print string in GOST format.
484
484
// Return next data address.
485
485
//
486
- unsigned Processor::e64_print_gost (unsigned addr0 , unsigned addr1 )
486
+ unsigned Processor::e64_print_gost (unsigned start_addr , unsigned end_addr )
487
487
{
488
- BytePointer bp (memory, addr0 );
488
+ BytePointer bp (memory, start_addr );
489
489
unsigned char last_ch = GOST_SPACE;
490
490
491
491
for (;;) {
492
492
if (bp.word_addr == 0 )
493
493
return 0 ;
494
494
495
495
// No data to print.
496
- if (addr1 && bp.word_addr == addr1 + 1 )
496
+ if (end_addr && bp.word_addr == end_addr + 1 )
497
497
return bp.word_addr ;
498
498
499
499
unsigned char ch = bp.get_byte ();
@@ -589,17 +589,17 @@ unsigned Processor::e64_print_gost(unsigned addr0, unsigned addr1)
589
589
//
590
590
// Print string in Dubna mode.
591
591
//
592
- void Processor::e64_print_dubna (unsigned addr0 , unsigned addr1 )
592
+ void Processor::e64_print_dubna (unsigned start_addr , unsigned end_addr )
593
593
{
594
- BytePointer bp (memory, addr0 );
594
+ BytePointer bp (memory, start_addr );
595
595
596
596
unsigned char ch = bp.get_byte ();
597
597
if (ch > 0 && e64_line_dirty) {
598
598
// Emit previous line.
599
599
e64_emit_line ();
600
600
}
601
601
for (;;) {
602
- if (addr1 && bp.word_addr == addr1 + 1 ) {
602
+ if (end_addr && bp.word_addr == end_addr + 1 ) {
603
603
// No data to print.
604
604
return ;
605
605
}
0 commit comments