Login

Subversion Repositories NedoOS

Rev

Rev 1086 | Rev 1223 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

я╗┐para512: ╨╜╨░ ╤Б╤В╨░╤А╤В╨╡ ╤А╨╕╤Б╤Г╨╡╤В ╨┐╨╛╨▓╨╡╤А╤Е ╨▓╤Б╨╡╨│╨╛ ╤Н╨║╤А╨░╨╜╨░ ╨║╤Г╤З╤Г ╨▒╨╗╨╛╨║╨╛╨▓ ╤А╨░╨╖╨╝╨╡╤А╨╛╨╝ 256*65536 - ╤В╨░╨║ ╨╕ ╨╜╨░╨┤╨╛? ╨┐╨╛╨║╨░ ╨║╨╛╤Б╤В╤Л╨╗╤М ╨┤╨╗╤П rep stosb 65536=0




╨┤╨╛╨▒╨░╨▓╨╕╤В╤М ╨▓╨░╤А╨╕╨░╨╜╤В declputm16_oldpg, ╨│╨┤╨╡ ╨┐╨╕╤Б╨░╤В╤М ╨▓ ╨╛╨▒╤А╨░╤В╨╜╨╛╨╝ ╨┐╨╛╤А╤П╨┤╨║╨╡, ╤З╤В╨╛╨▒╤Л ╨╝╨╛╨╢╨╜╨╛ ╨▒╤Л╨╗╨╛ ╨▓╨║╨╗╤О╤З╨╕╤В╤М ╤Б╤В╨░╤А╤Г╤О ╤Б╤В╤А╨░╨╜╨╕╤Ж╤Г


╨▓ ╨╜╨╡╨║╨╛╤В╨╛╤А╤Л╤Е ╤Б╨╗╤Г╤З╨░╤П╤Е ld b,tscrpgs ╨╝╨╛╨╢╨╜╨╛ ╨╖╨░╨╝╨╡╨╜╨╕╤В╤М ╨╜╨░ inc b?


╤З╤В╨╛ ╤Н╤Д╤Д╨╡╨║╤В╨╕╨▓╨╜╨╡╨╡ - ╨▒╤Л╤Б╤В╤А╤Л╨╣ sp ╤Б ╨┐╤А╨╛╨▓╨╡╤А╨║╨╛╨╣ 18t ╨┐╤А╨╕ ╨║╨░╨╢╨┤╨╛╨╣ ╨╖╨░╨┐╨╕╤Б╨╕ r16 (╤З╤В╨╛╨▒╤Л ╨▓╨║╨╗╤О╤З╨╕╤В╤М ╤Б╤В╤А╨░╨╜╨╕╤Ж╤Г) ╨╕╨╗╨╕ sp ╨║╨░╨║ ╨╛╨▒╤Л╤З╨╜╤Л╨╣ ╤А╨╡╨│╨╕╤Б╤В╤А (╨╕ ╨╗╨╕╤И╨╜╨╕╨╣ ╤Б╨╡╨│╨╝╨╡╨╜╤В ╨┐╨╛╨┤ ╨║╨╛╨┤)?

╨▓ call/jmp/ret ╤Б╨┤╨╡╨╗╨░╤В╤М ╤В╨░╨║╤Г╤О ╨╢╨╡ ╨┐╤А╨╛╨▓╨╡╤А╨║╤Г ╨▒╤Л╤Б╤В╤А╨╛╨│╨╛ ╨▓╤Л╤Е╨╛╨┤╨░, ╨║╨░╨║ ╨▓ jr


╤Д╨╗╨░╨│╨╕ ╤З╤С╤В╨╜╨╛╤Б╤В╨╕ ╨╕ ╨┐╨╡╤А╨╡╨┐╨╛╨╗╨╜╨╡╨╜╨╕╤П ╨╛╤В╨║╨╗╤О╤З╨░╤В╤М ╨╜╨░╤Б╤В╤А╨╛╨╣╨║╨╛╨╣?
╨╕╨╝╨╡╨╡╤В ╤Б╨╝╤Л╤Б╨╗ ╨╛╤В╨║╨╗╤О╤З╨╕╤В╤М ╨╛╨▒╨░ ╨▓ ╤Б╨┤╨▓╨╕╨│╨░╤Е
╤З╤С╤В╨╜╨╛╤Б╤В╤М ╨╛╤Б╤В╨░╨▓╨╕╤В╤М ╤В╨╛╨╗╤М╨║╨╛ ╨▓ ╨╗╨╛╨│╨╕╨║╨╡
╨┐╨╡╤А╨╡╨┐╨╛╨╗╨╜╨╡╨╜╨╕╤П ╨╛╤Б╤В╨░╨▓╨╕╤В╤М ╤В╨╛╨╗╤М╨║╨╛ ╨▓ ╨░╤А╨╕╤Д╨╝╨╡╤В╨╕╨║╨╡


╨╜╨╡ ╤Д╨╛╤А╨╝╨╕╤А╨╛╨▓╨░╤В╤М ╤Б╤А╨░╨╖╤Г ╤Д╨╗╨░╨│ ╤З╤С╤В╨╜╨╛╤Б╤В╨╕, ╨░ ╨║╨╛╨┐╨╕╤А╨╛╨▓╨░╤В╤М ╨┐╨╛╤Б╨╗╨╡╨┤╨╜╨╕╨╣ ╤А╨╡╨╖╤Г╨╗╤М╤В╨░╤В ╨▓ ╤А╨╡╨│╨╕╤Б╤В╤А. ╨║╨╛╨│╨┤╨░ ╨╜╨░╨┤╨╛ ╨▒╤Г╨┤╨╡╤В ╨┐╨╡╤А╨╡╨╣╤В╨╕ ╨┐╨╛ ╤З╤С╤В╨╜╨╛╤Б╤В╨╕ (╤Н╤В╨╛ ╤А╨╡╨┤╨║╨╛ ╨╜╨░╨┤╨╛), ╤В╨╛╨│╨┤╨░ ╨╕ ╨┐╨╛╤Б╤З╨╕╤В╨░╨╡╨╝ ╤З╤С╤В╨╜╨╛╤Б╤В╤М
╤В╨╛╨│╨┤╨░ ╨╗╨╛╨│╨╕╤З╨╡╤Б╨║╨╕╨╡ ╨╛╨┐╨╡╤А╨░╤Ж╨╕╨╕ ╨╕ ╤Б╨┤╨▓╨╕╨│╨╕ ╤З╨╡╤А╨╡╨╖ rlca/rla/rrca/rra, ╤З╤В╨╛╨▒╤Л ╨╜╨╡ ╨╝╨╡╨╜╤П╤В╤М ╤Д╨╗╨░╨│╨╕ ╨▓╨╛╨╛╨▒╤Й╨╡, ╨║╤А╨╛╨╝╨╡ C
╤Д╨╗╨░╨│ AC (x86) = ╤Д╨╗╨░╨│ H (Z80)

╤Б╨┤╨▓╨╕╨│╨╕ ╤В╨░╨║╨╢╨╡ ╤Д╨╛╤А╨╝╨╕╤А╤Г╤О╤В ╤Д╨╗╨░╨│ O: The OF flag is affected only on 1-bit shifts. For left shifts, the OF flag is set to 0 if the most significant bit of the result is the same as the CF flag (that is, the top two bits of the original operand were the same); otherwise, it is set to 1. For the SAR instruction, the OF flag is cleared for all 1-bit shifts. For the SHR instruction, the OF flag is set to the most-significant bit of the original operand. https://c9x.me/x86/html/file_module_x86_id_285.html  The OF flag is defined only for the 1-bit rotates; it is undefined in all other cases (except that a zero-bit rotate does nothing, that is affects no flags). For left rotates, the OF flag is set to the exclusive OR of the CF bit (after the rotate) and the most-significant bit of the result. For right rotates, the OF flag is set to the exclusive OR of the two most-significant bits of the result. https://c9x.me/x86/html/file_module_x86_id_273.html

╨▓╨╛ ╨▓╤Б╨╡╤Е ╨║╨╛╨╝╨░╨╜╨┤╨░╤Е ╨▓╤А╤Г╤З╨╜╤Г╤О ╤Е╤А╨░╨╜╨╕╤В╤М ╨┤╨░╨╜╨╜╤Л╨╡ ╨┤╨╗╤П ╤Д╨╗╨░╨│╨░ O? rra:ld of,a:rla (╨╡╤Б╨╗╨╕ ╨┤╨▓╨░ ╤Б╤В╨░╤А╤И╨╕╤Е ╨▒╨╕╤В╨░ ╤А╨░╨╖╨╜╤Л╨╡, ╤В╨╛ ╤Н╤В╨╛ ╨┐╨╡╤А╨╡╨┐╨╛╨╗╨╜╨╡╨╜╨╕╨╡). ╨║ ╤Б╨╛╨╢╨░╨╗╨╡╨╜╨╕╤О, ╨╜╨╡╨╗╤М╨╖╤П ╨╛╨▒╤К╨╡╨┤╨╕╨╜╨╕╤В╤М ╤Б ╨┤╨░╨╜╨╜╤Л╨╝╨╕ ╨┤╨╗╤П ╤Д╨╗╨░╨│╨░ P (╤З╤В╨╛╨▒╤Л ╨┐╨╛╤В╨╛╨╝ ╨┐╤А╨╛╨▓╨╡╤А╤П╤В╤М ╤Б ╤Г╤З╤С╤В╨╛╨╝ C), ╤В.╨║. ╨╜╨╡ ╨▓╤Б╨╡ ╨║╨╛╨╝╨░╨╜╨┤╤Л ╨╝╨╡╨╜╤П╤О╤В ╨╛╨┤╨╜╨╛╨▓╤А╨╡╨╝╨╡╨╜╨╜╨╛ P, O, C (╨╗╨╛╨│╨╕╤З╨╡╤Б╨║╨╕╨╡ ╤Б╨┤╨▓╨╕╨│╨╕ - ╤В╨╛╨╗╤М╨║╨╛ O, C).
╤В╨╛╨│╨┤╨░ ╨▓╤Б╨╡ ╤Б╨┤╨▓╨╕╨│╨╕ ╤В╨╛╤З╨╜╨╛ ╤Б╨╛╨╛╤В╨▓╨╡╤В╤Б╤В╨▓╤Г╤О╤В ╤Б╨┤╨▓╨╕╨│╨░╨╝ ╨╜╨░ Z80 (╨╗╨╛╨│╨╕╤З╨╡╤Б╨║╨╕╨╡ - ╤З╨╡╤А╨╡╨╖ rrca/..., ╨░╤А╨╕╤Д╨╝╨╡╤В╨╕╤З╨╡╤Б╨║╨╕╨╡ - ╤З╨╡╤А╨╡╨╖ #cb xx)
╨╜╤Г╨╢╨╜╨╛ ╤Е╤А╨░╨╜╨╕╤В╤М ╨▓ ╤А╨╡╨│╨╕╤Б╤В╤А╨░╤Е:
8 parity data (d'?)
8 overflow data (e'?)

╨╗╤Г╤З╤И╨╡ ╨┤╨╗╤П ╨╡╨┤╨╕╨╜╨╛╨╛╨▒╤А╨░╨╖╨╕╤П ╤Е╤А╨░╨╜╨╕╤В╤М ╨▓╤Б╨╡ ╤А╨╡╨│╨╕╤Б╤В╤А╤Л ╨▓ ╨┐╨░╨╝╤П╤В╨╕
parity,overflow ╨▓ ix? ╨╜╨╕╤З╨╡╨│╨╛ ╨╜╨╡ ╨┤╨░╤Б╤В?

fs,gs ╨╜╤Г╨╢╨╜╤Л ╤В╨╛╨╗╤М╨║╨╛ ╨┤╨╗╤П 386?

╨╗╤Г╤З╤И╨╡ CS ╨▓╤Б╨╡╨│╨┤╨░ ╨▓╨║╨╗╤О╤З╨░╤В╤М ╨▓ ╨║╨╛╨╜╨║╤А╨╡╤В╨╜╨╛╨╡ ╨╛╨║╨╜╨╛ (4000) ╨╕ ╤Е╤А╨░╨╜╨╕╤В╤М ╨┐╨╡╤А╨╡╤Б╤З╨╕╤В╨░╨╜╨╜╤Л╨╣ PC
SS ╨▓╤Б╨╡╨│╨┤╨░ ╨▓╨║╨╗╤О╤З╨░╤В╤М ╨▓ ╨┤╤А╤Г╨│╨╛╨╡ ╨║╨╛╨╜╨║╤А╨╡╤В╨╜╨╛╨╡ ╨╛╨║╨╜╨╛ (8000) (sp ╨╜╨╡ ╨┐╨╡╤А╨╡╤Б╤З╨╕╤В╨░╨╜ ╨┤╨╗╤П ╨╡╨┤╨╕╨╜╨╛╨╛╨▒╤А╨░╨╖╨╕╤П, ╨╜╨╛ ╨┐╨╛╤Б╨╗╨╡ ╨╡╨│╨╛ ╨╕╨╖╨╝╨╡╨╜╨╡╨╜╨╕╤П ╨╜╨░╨┤╨╛ encodeSP)
╤В╤А╨╡╤В╤М╨╡ ╨╛╨║╨╜╨╛ (c000) ╨┐╨╛╨┤ ╨┤╨░╨╜╨╜╤Л╨╡

╨║╨░╨║ ╨░╨┤╤А╨╡╤Б╨╛╨▓╨░╤В╤М ╨┐╨░╨╝╤П╤В╤М ╨┐╨╛ ?s:de = (?s*16 + de)/16384 ╨╕ mod 16384:
?s*16 ╤Б╤А╨░╨╖╤Г ╤Е╤А╨░╨╜╨╕╤В╤М ╨║╨░╨║ 24 ╨▒╨╕╤В╨░ (╨┤╨╗╤П ╨▓╤Б╨╡╤Е ?s)