converting_20binary_20to_20bcd
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| converting_20binary_20to_20bcd [2018/03/31 13:19] – external edit 127.0.0.1 | converting_20binary_20to_20bcd [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| fild dword [bin%] | fild dword [bin%] | ||
| fbstp tbyte [bcd%] | fbstp tbyte [bcd%] | ||
| - | Note that **ten** bytes of memory must be allocated for the BCD number, and that the last byte contains just a sign bit in the MSB. The remaining seven bits in that byte should be ignored.\\ \\ The following test program demonstrates the use of this code:\\ \\ | + | Note that **ten** bytes of memory must be allocated for the BCD number, and that the last byte contains just a sign bit in the MSB. The remaining seven bits in that byte should be ignored.\\ \\ The following test program demonstrates the use of this code: |
| + | |||
| + | <code bb4w> | ||
| DIM bin% 3, bcd% 9 | DIM bin% 3, bcd% 9 | ||
| PROCassemble | PROCassemble | ||
| Line 24: | Line 26: | ||
| ] | ] | ||
| ENDPROC | ENDPROC | ||
| + | </ | ||
| + | |||
| In this case only the final 8 digits of the BCD number are printed. | In this case only the final 8 digits of the BCD number are printed. | ||
converting_20binary_20to_20bcd.1522502351.txt.gz · Last modified: 2024/01/05 00:18 (external edit)