Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure expandCharacter2x(srcData,dstData : Pointer);
- var
- dByteL : Byte;
- dByteR : Byte;
- sByte : Byte;
- dDataL : Byte;
- dDataR : Byte;
- sData : Byte;
- y : Byte;
- begin
- // A -> AB
- // CD
- dByteL := 0;
- dByteR := dByteL+8;
- for y := 0 to 7 do begin
- sByte := y div 2;
- sData := srcData^[sByte];
- asm
- // do left hand/right hand char shift dData <- sData
- lda sData
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- end;
- dstData^[dByteL] := dDataL;
- dstData^[dByteR] := dDataR;
- Inc(dByteL);
- Inc(dByteR);
- end;
- dByteL := 16;
- dByteR := dByteL+8;
- for y := 8 to 15 do begin
- sByte := y div 2;
- sData := srcData^[sByte];
- asm
- // do left hand/right hand char shift dData <- sData
- lda sData
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- cmp #128; rol dDataR; rol dDataL; cmp #128; rol dDataR; rol dDataL; asl
- end;
- dstData^[dByteL] := dDataL;
- dstData^[dByteR] := dDataR;
- Inc(dByteL);
- Inc(dByteR);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement