本帖最后由 neorobin 于 2014-10-1 20:15 编辑
| @echo off & setlocal enabledelayedexpansion & color 0a | | set LF=^ | | | | | | for /l %%i in () do ( | | set /a "t=!time:~-4,1!" & set /a "t ^= x, x ^= t" | | if !t! neq 0 ( | | set /a "c = ^!^!(x-2)" | | set /a "b = ^!^!(x-5)&^!^!(x-6)" | | set /a "a = (^!^!(x-1) & ^!^!(x-4)) << 1" | | set /a "d = (a >> 1 & ^!^!(x-7)) << 1" | | set /a "g = ^!(^!x | ^!(x-1) | ^!(x-7)) << 1" | | set /a "f = (^!(x&3) | ^!^!(x&~3)) & ^!^!(x-7)" | | set /a "e = ~x & 1 & ^!^!(x-4)" | | | | set "O= !a!!LF!!f! !b!!LF! !g!!LF!!e! !c!!LF! !d!" | | set "O=!O:1=|!" & set "O=!O:2=-!" & cls & echo !O:0= ! | | ) | | )COPY |
数码管时钟
 | set "_c="c = !!(x-2)"" | | set "_b="b = !!(x-5)^&!!(x-6)"" | | set "_a="a = (!!(x-1) ^& !!(x-4)) ^<^< 1"" | | set "_d="d = (!!(x-1) ^& !!(x-4) ^& !!(x-7)) ^<^< 1"" | | set "_g="g = !(!x ^| !(x-1) ^| !(x-7)) ^<^< 1"" | | set "_f="f = (!(x^&3) ^| !!(x^&~3)) ^& !!(x-7)"" | | set "_e="e = ~x ^& 1 ^& !!(x-4)"" | | @echo off & setlocal enabledelayedexpansion & color 0a & mode 33,5 | | set "__=0" & set "_= " | | for /l %%i in () do ( | | set /a "t=!time:~-2,1!" & set /a "t ^= z, z ^= t" | | if !t! neq 0 ( | | set "O=" & set "i=0" | | for %%L in ("_ a _" "f _ b" "_ g _" "e _ c" "_ d _") do ( | | for %%d in (0 _ 1 _ : _ 3 _ 4 _ : _ 6 _ 7 _ : _ 9) do ( | | if "%%d" geq "0" ( | | set "tm=!time: =0!" & set "x=!tm:~%%d,1!" | | for %%_ in (%%~L) do set /a !_%%_! & set "O=!O!!%%_!" | | ) else if "!i!%%d"=="1:" (set "O=!O!.") else set "O=!O! " | | ) | | set /a "i^=1" | | ) | | set "O=!O:1=|!" & set "O=!O:2=-!" & cls & set "O=!O:0= !" | | <nul set /p=!O:~0,-1! | | ) | | )COPY |
|