Главная » Просмотр файлов » CPM2A_PROGRAMMING MANUAL (W353-E1-2)

CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 76

Файл №986750 CPM2A_PROGRAMMING MANUAL (W353-E1-2) (Техническая документация) 76 страницаCPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750) страница 762015-07-23СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 76)

If normal data is being used, a negativeresult (signed binary) must be converted to normal data using NEG(––). Refer to7-20-12 2’s COMPLEMENT – NEG(––) for details.Address0000100000000010000200003CLC(41)SBB(51)InstructionLDOUTCLC(41)SBB(51)OperandsTR000011LRHR2000001200LR00HR 01In the case below, the content of LR 00 (#7A03) and CY are subtracted fromIR 002 (#F8C5). Since the result is positive, CY is 0.If the result had been negative, CY would have been set to 1.

For normal (unsigned) data, the result would have to be converted to its 2’s complement.FMi: IR 0028C5–7Su: LR 00A03–0700R: HR 01ECCY = 0(from CLC(41))02Note For signed binary calculations, the status of the UF and OF flags indicate whether the result has exceeded the signed binary data range (–32,768 (8000) to+32,767 (7FFF)).439Section 7-22Binary Calculation Instructions7-22-3 BINARY MULTIPLY – MLB(52)Operand Data AreasMd: Multiplicand word (binary)Ladder SymbolsIR, SR, AR, DM, HR, TC, LR, #MLB(52)@MLB(52)MdMdMrMrRRMr: Multiplier word (binary)IR, SR, AR, DM, HR, TC, LR, #R: First result wordIR, SR, AR, DM, HR LRLimitationsDM 6144 to DM 6655 cannot be used for R.MLB(52) cannot be used to multiply signed binary data.DescriptionWhen the execution condition is OFF, MLB(52) is not executed.

When theexecution condition is ON, MLB(52) multiplies the content of Md by the contentsof Mr, places the rightmost four digits of the result in R, and places the leftmostfour digits in R+1.MdXMrR +1FlagsRIndirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)ON when the result is 0.ER:EQ:7-22-4 BINARY DIVIDE – DVB(53)Operand Data AreasDd: Dividend word (binary)Ladder SymbolsIR, SR, AR, DM, HR, TC, LR, #DVB(53)@DVB(53)DdDdDrDrRRDr: Divisor word (binary)IR, SR, AR, DM, HR, TC, LR, #R: First result wordIR, SR, AR, DM, HR LRLimitationsDM 6144 to DM 6655 cannot be used for R.DVB(53) cannot be used to divide signed binary data.DescriptionWhen the execution condition is OFF, DVB(53) is not executed.

When theexecution condition is ON, DVB(53) divides the content of Dd by the content ofDr and the result is placed in R and R+1: the quotient in R, the remainder in R+1.QuotientRDr440DdRemainderR+1Section 7-23Special Math InstructionsFlagsER:Dr contains 0.Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)EQ:ON when the result is 0.7-23 Special Math Instructions7-23-1 DATA SEARCH – SRCH(––)Ladder SymbolsOperand Data AreasN: Number of wordsSRCH(––)@SRCH(––)NNR1R1CCIR, SR, AR, DM, HR, TC, LR, #R1: First word in rangeIR, SR, AR, DM, HR, TC, LRC: Comparison data, result wordIR, SR, AR, DM, HR, LRLimitationsThis instruction is available in the CPM2A/CPM2C only.N must be BCD between 0001 to 9999.R1 and R1+N–1 must be in the same data area.DM 6144 to DM 6655 cannot be used for C.DescriptionWhen the execution condition is OFF, SRCH(––) is not executed.

When theexecution condition is ON, SRCH(––) searches the range of memory from R1 toR1+N–1 for addresses that contain the comparison data in C. If one or more addresses contain the comparison data, the EQ Flag (SR 25506) is turned ON andthe lowest address containing the comparison data is identified in C+1. The address is identified differently for the DM area:1, 2, 3...1.

For an address in the DM area, the word address is written to C+1. For example, if the lowest address containing the comparison data is DM 0114,then #0114 is written in C+1.2. For an address in another data area, the number of addresses from the beginning of the search is written to C+1. For example, if the lowest addresscontaining the comparison data is IR 114 and the first word in the searchrange is IR 014, then #0100 is written in C+1.If none of addresses in the range contain the comparison data, the EQ Flag(SR 25506) is turned OFF and C+1 is left unchanged.FlagsER:Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)N is not BCD between 0001 and 9999.R1 and R1+N–1 are not in the same data area.EQ:ExampleON when the comparison data has been matched in the search range.In the following example, the 10 word range from IR 200 to IR 209 is searchedfor addresses that contain the same data as DM 0100 (89AB).

Since IR 204 con-441Section 7-23Special Math Instructionstains the same data, the EQ Flag (SR 25506) is turned ON and #0004 is writtento DM 0101.00000Address@SRCH(––)0000000001#0010200InstructionOperandsLD@SRCH(––)00000#DM 0100DMDM 010089ABIR 200IR 201IR 202IR 203IR 204IR 205IR 206IR 207IR 208IR 20912345678ABCDEF1389AB886090CD00FF89AB810COffset: 0004Offset of first word containing the search dataDM 01010010020001000004← Search data found← Search data foundNote The matching search data in IR 208 is ignored because the search data wasfound in an earlier word in the range.7-23-2 FIND MAXIMUM – MAX(––)Ladder SymbolsOperand Data AreasC: Control dataMAX(––)@MAX(––)CCR1R1DDIR, SR, AR, DM, HR, TC, LR, #R1: First word in rangeIR, SR, AR, DM, HR, TC, LRD: Destination wordIR, SR, AR, DM, HR, LRLimitationsThis instruction is available in the CPM2A/CPM2C only.N must be BCD between 0001 to 9999.R1 and R1+N–1 must be in the same data area.DM 6144 to DM 6655 cannot be used for D.DescriptionWhen the execution condition is OFF, MAX(––) is not executed.

When theexecution condition is ON, MAX(––) searches the range of memory from R1 toR1+N–1 for the address that contains the maximum value and outputs the maximum value to the destination word (D).The address is identified differently for the DM area:1, 2, 3...4421.

For an address in the DM area, the word address is written to C+1. For example, if the address containing the maximum value is DM 0114, then #0114is written in D+1.2. For an address in another data area, the number of addresses from the beginning of the search is written to D+1. For example, if the address containing the maximum value is IR 114 and the first word in the search range isIR 014, then #0100 is written in D+1.Section 7-23Special Math InstructionsIf bit 14 of C is ON and more than one address contains the same maximum value, the position of the lowest of the addresses will be output to D+1.

The positionwill be output as the DM address for the DM area, but as an absolute positionrelative to the first word in the range for all other areas.The number of words within the range (N) is contained in the 3 rightmost digits ofC, which must be BCD between 001 and 999.When bit 15 of C is OFF, data within the range is treated as unsigned binary andwhen it is ON the data is treated as signed binary.151413121100C:Number of wordsin range (N: 001 to 999 BCD)Not used – set to zero.Not used – set to zero.! CautionFlagsOutput address to D+1?1 (ON): Yes.0 (OFF): No.If bit 14 of C is ON, values above #8000 are treated as negative numbers, so theresults will differ depending on the specified data type.

Be sure that the correctdata type is specified.ER:Indirectly addressed DM word is non-existent. (Content of *DM word isnot BCD, or the DM area boundary has been exceeded.)R1 and R1+N–1 are not in the same data area.EQ:ExampleON when the maximum value is #0000.When IR 00000 is ON, the control data in DM 0000 (4010) will cause a search forthe maximum value in the 10 words starting at IR 200. The largest unsigned val-443Section 7-23Special Math Instructionsue will be stored in DM 0500.

The offset from the beginning of the search of theword containing the maximum value will be stored in DM 0501.00000MAX(––)DM 0000200AddressInstruction0000000001OperandsLDMAX(––)00000DMDM 0500DM10 wordsDM 00004010IR 2003F2AIR 20151C3IR 202E02AIR 2037C9FIR 2042A20IR 205A827IR 2062A20IR 207E02AIR 208C755IR 20994DCDM 0500E02ADM 0501000200002000500Offset of word containing maximum value: 2 wordsMaximum valueMaximum valueIf there are two words containingthe maximum value, the one foundfirst will be stored in DM 0501.7-23-3 FIND MINIMUM – MIN(––)Ladder SymbolsOperand Data AreasC: Control dataMIN(––)@MIN(––)CCR1R1DDIR, SR, AR, DM, HR, TC, LR, #R1: First word in rangeIR, SR, AR, DM, HR, TC, LRD: Destination wordIR, SR, AR, DM, HR, LRLimitationsThis instruction is available in the CPM2A/CPM2C only.N must be BCD between 0001 to 9999.R1 and R1+N–1 must be in the same data area.DM 6144 to DM 6655 cannot be used for D.DescriptionWhen the execution condition is OFF, MIN(––) is not executed.

Характеристики

Тип файла
PDF-файл
Размер
2,99 Mb
Тип материала
Высшее учебное заведение

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6417
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее