d*, al//把al的8位值送d*端口Р inc alРcmp al, 0efh//将al的值与0efh进展比拟РJa againР jmp again//ja根据again1决定是否跳转,假设=1,则跳转,否则不跳转Рagain1: out d*, alР dec alРРРРРР-Р. z.Р cmp al, 010hР again Р jmp again1//ja根据again1决定是否跳转,假设1则跳转,否则不跳转Рstart endpРcode endsР end startР产生波形如下:Р方波Р方波的汇编程序如下:РCS0832 equ 08000hРcode segmentР assume cs:codeРstart proc near Р mov d*,cs0832Р mov bl, 07ehРmov cl,01hРmov bh,0Р again1:mov al,0hРOut d*,alР inc bhРcmp bh, blРja again2Р jmp again1Рagain2:mov al, 07ehР out d*, alР dec bhР cmp bh,clР again1Рjmp again2Рstart endpРcode endsР end startР产生波形如下: